summaryrefslogtreecommitdiff
path: root/nongnu/packages/sml.scm
diff options
context:
space:
mode:
authorDespereaux Polacre <dspx.plcr@proton.me>2025-04-02 23:48:12 +0200
committerHilton Chain <hako@ultrarare.space>2025-04-18 15:11:43 +0800
commit6f4d87c43a1c2cf992aa60d5b204e887f4cfbf01 (patch)
tree24d71c6514b8a427e172b72007e6c4da5c958505 /nongnu/packages/sml.scm
parentb7fbe3ee7901b3462669a5128ff6a204c5a5153f (diff)
nongnu: Add mosml.
* nongnu/packages/sml.scm: New file. Signed-off-by: Hilton Chain <hako@ultrarare.space> Modified-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'nongnu/packages/sml.scm')
-rw-r--r--nongnu/packages/sml.scm65
1 files changed, 65 insertions, 0 deletions
diff --git a/nongnu/packages/sml.scm b/nongnu/packages/sml.scm
new file mode 100644
index 0000000..6277dfb
--- /dev/null
+++ b/nongnu/packages/sml.scm
@@ -0,0 +1,65 @@
+(define-module (nongnu packages sml)
+ #:use-module (guix gexp)
+ #:use-module ((guix licenses) #:prefix license-gnu:)
+ #:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module ((nonguix licenses) #:prefix license:)
+ #:use-module (guix git-download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages gawk)
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages perl))
+
+(define-public mosml
+ (let ((commit "13c581aec46eea134e478f2e2b6456278e36ecce")
+ (revision "0"))
+ (package
+ (name "mosml")
+ (version (git-version "2.10.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kfl/mosml")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "191x0kcpybw5zvxsgl5if9x53b3w8zm0z72xfg1x5jwqslmk9bpr"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "PREFIX=" #$output)
+ "-C" "src" )
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;No configure script.
+ (add-after 'unpack 'fix-makefile-bin-sh
+ (lambda _
+ (substitute* "src/Makefile.inc"
+ (("SHELL=/bin/sh")
+ (string-append "SHELL=" (which "sh"))))))
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "-C" "src/test"
+ (string-append
+ "MOSML=" #$output "/bin/mosml"))))))))
+ (native-inputs (list perl))
+ (inputs (list gmp))
+ (home-page "https://mosml.org")
+ (synopsis
+ "Moscow ML implementation of the Standard ML programming language")
+ (description
+ "Moscow ML is a light-weight implementation of Standard ML (SML), a
+strict functional language used in teaching and research")
+ (license
+ ;; XXX: This package is redistributable but has licensing issue, its own
+ ;; code is GPL but contain non-free bundled sources. GPL is commented
+ ;; here because showing it along with nonfree ones is confusing.
+ (list ;; license-gnu:gpl2
+ (license:nonfree "file://copyright/copyrght.att")
+ (license:nonfree "file://copyright/copyrght.cl"))))))