2022-12-19 17:17:39 +01:00
|
|
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
2022-07-03 15:24:31 +02:00
|
|
|
;;; Copyright © 2022 Pierre Neidhardt <mail@ambrevar.xyz>
|
2024-03-13 09:01:29 +01:00
|
|
|
;;; Copyright © 2023, 2024 André A. Gomes <andremegafone@gmail.com>
|
2022-07-03 15:24:31 +02:00
|
|
|
|
|
|
|
(define-module (nongnu packages lisp)
|
|
|
|
#:use-module (ice-9 match)
|
|
|
|
#:use-module (gnu packages bash)
|
|
|
|
#:use-module (gnu packages compression)
|
|
|
|
#:use-module (gnu packages tls)
|
2023-06-05 14:54:58 +02:00
|
|
|
#:use-module (gnu packages lisp)
|
|
|
|
#:use-module (gnu packages lisp-xyz)
|
|
|
|
#:use-module (nongnu packages electron)
|
2022-07-03 15:24:31 +02:00
|
|
|
#:use-module (guix build-system copy)
|
|
|
|
#:use-module (guix build-system gnu)
|
2023-06-05 14:54:58 +02:00
|
|
|
#:use-module (guix build-system asdf)
|
2022-07-03 15:24:31 +02:00
|
|
|
#:use-module (guix download)
|
2023-06-05 14:54:58 +02:00
|
|
|
#:use-module (guix git-download)
|
2022-07-03 15:24:31 +02:00
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (nonguix build-system binary)
|
2023-06-05 14:54:58 +02:00
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
2022-07-03 15:24:31 +02:00
|
|
|
#:use-module ((nonguix licenses) #:prefix license:))
|
|
|
|
|
|
|
|
;; TODO: Split into differents outputs:
|
|
|
|
;; - emacs: for ELI. Or just remove it and use our own up-to-date package?
|
|
|
|
;; - doc: For the doc. (> 40+10 MiB).
|
|
|
|
;; - gui: For the express GUI (including all the JS stuff).
|
|
|
|
;; - out: Everything else: alisp, alisp.dxl, etc.
|
|
|
|
(define-public allegro-cl
|
|
|
|
(package
|
|
|
|
(name "allegro-cl")
|
|
|
|
(version "10.1")
|
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri
|
|
|
|
(let ((arch1 (match (or (%current-target-system) (%current-system))
|
|
|
|
("armhf-linux" "linuxarm64")
|
|
|
|
("i686-linux" "linux86")
|
|
|
|
(s "linuxamd64.64")))
|
|
|
|
(arch2 (match (or (%current-target-system) (%current-system))
|
|
|
|
("armhf-linux" "linux-aarch64")
|
|
|
|
("i686-linux" "linux-x86")
|
|
|
|
(s "linux-x64"))))
|
|
|
|
(string-append "https://franz.com/ftp/pub/acl"
|
|
|
|
version "express/" arch1
|
|
|
|
"/acl" version "express-" arch2 ".tbz2")))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2023-05-30 18:12:10 +02:00
|
|
|
"1zxajn238aibsv0qknm5kiqjiplb4ggynjsxar390rwznh57qc46"))))
|
2022-07-03 15:24:31 +02:00
|
|
|
(build-system binary-build-system)
|
|
|
|
(inputs (list bash-minimal zlib openssl))
|
|
|
|
(arguments
|
|
|
|
;; FIXME: Patchelf the .so files as well? Does not seem necessary.
|
|
|
|
`(#:patchelf-plan '(("alisp")
|
|
|
|
("allegro-express"))
|
|
|
|
#:install-plan
|
|
|
|
'(("." "share/allegro-cl/"
|
|
|
|
;; The "eli" Emacs interface is outdated and broken.
|
|
|
|
;; Use the Nonguix emacs-eli package instead.
|
|
|
|
#:exclude ("update.sh" "eli")))
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(replace 'unpack
|
|
|
|
;; Guix does not know how to extract .tbz2.
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
(mkdir-p "source")
|
|
|
|
(invoke "tar"
|
|
|
|
"--directory=source" "-xvf" (assoc-ref inputs "source")
|
|
|
|
"--strip-components" "1")
|
|
|
|
(chdir "source")))
|
2023-05-30 18:12:10 +02:00
|
|
|
(add-after 'install 'update-license
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(substitute*
|
|
|
|
(string-append (assoc-ref outputs "out")
|
|
|
|
"/share/allegro-cl/devel.lic")
|
|
|
|
((";; License created on January 25, 2021, 8:32:19\\.")
|
|
|
|
";; License created on January 17, 2023, 10:42:54.")
|
|
|
|
((";; Expiration date: 2023-1-31 00:00:00")
|
|
|
|
";; Expiration date: 2024-1-31 00:00:00"))
|
|
|
|
#t))
|
2022-07-03 15:24:31 +02:00
|
|
|
(add-after 'install 'wrap-program
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
(zlib-lib (string-append (assoc-ref inputs "zlib") "/lib"))
|
|
|
|
(openssl-lib (string-append (assoc-ref inputs "openssl") "/lib"))
|
|
|
|
(openssl-bin (string-append (assoc-ref inputs "openssl") "/bin"))
|
|
|
|
(bash-bin (string-append (assoc-ref inputs "bash") "/bin"))
|
|
|
|
(wrapper (string-append out "/bin/allegro-express"))
|
|
|
|
(bin (string-append out "/share/allegro-cl/"
|
|
|
|
"allegro-express"))
|
|
|
|
(cli-wrapper (string-append out "/bin/alisp"))
|
|
|
|
(cli-bin (string-append out "/share/allegro-cl/"
|
|
|
|
"alisp")))
|
|
|
|
(mkdir-p (dirname wrapper))
|
|
|
|
(pk 'BIN bin)
|
|
|
|
(make-wrapper wrapper bin
|
|
|
|
`("LD_LIBRARY_PATH" ":" prefix
|
|
|
|
,(list zlib-lib openssl-lib))
|
|
|
|
`("PATH" ":" prefix
|
|
|
|
,(list openssl-bin bash-bin)))
|
|
|
|
(make-wrapper cli-wrapper cli-bin))
|
|
|
|
#t)))))
|
|
|
|
(native-search-paths
|
|
|
|
;; XDG_DATA_DIRS is required to find the cl-* libraries.
|
|
|
|
(list
|
|
|
|
(search-path-specification
|
|
|
|
(variable "XDG_DATA_DIRS")
|
|
|
|
(files '("share")))))
|
|
|
|
(synopsis "Commercial software implementation of the language Common Lisp")
|
|
|
|
(description
|
|
|
|
"This is a Lisp implementation by Franz Inc.
|
|
|
|
It includes AllegroCache, a command line based REPL as well as a web-based GUI.
|
|
|
|
|
|
|
|
The Express Edition has a heap limitation compared to the commercial versions
|
|
|
|
of Allegro CL.
|
|
|
|
|
|
|
|
You can run the GUI from a container, for instance:
|
|
|
|
|
|
|
|
guix shell --container --network allegro-cl -- allegro-express
|
|
|
|
|
|
|
|
then open a browser at http://localhost:PORT, where PORT is the indicated port.")
|
|
|
|
(home-page "https://franz.com/products/allegrocl/")
|
|
|
|
(license (license:nonfree
|
|
|
|
"https://franz.com/ftp/pub/legal/ACL-Express-20170301.pdf"))))
|
2023-06-05 14:54:58 +02:00
|
|
|
|
|
|
|
(define-public sbcl-cl-electron
|
2024-03-13 09:01:29 +01:00
|
|
|
(let ((commit "f2245dc1450a6ad416984cf932be50e00957390a")
|
|
|
|
(revision "3"))
|
2023-06-05 14:54:58 +02:00
|
|
|
(package
|
|
|
|
(name "sbcl-cl-electron")
|
|
|
|
(version (git-version "0.0.0" revision commit))
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/atlas-engineer/cl-electron")
|
|
|
|
(commit commit)))
|
|
|
|
(file-name (git-file-name "cl-electron" version))
|
|
|
|
(sha256
|
2024-03-13 09:01:29 +01:00
|
|
|
(base32 "0c18xbwwnjaiwzd01dprdrwzp27nwihaf7pmkql1f5yk43x3ajs0"))))
|
2023-06-05 14:54:58 +02:00
|
|
|
(build-system asdf-build-system/sbcl)
|
2024-03-13 09:01:29 +01:00
|
|
|
(inputs (list electron
|
2023-11-22 10:51:08 +01:00
|
|
|
sbcl-cl-json sbcl-iolib sbcl-cl-str sbcl-nclasses
|
2024-03-13 09:01:29 +01:00
|
|
|
sbcl-cl-ppcre sbcl-bordeaux-threads sbcl-lparallel
|
|
|
|
sbcl-parenscript sbcl-spinneret))
|
|
|
|
(arguments
|
|
|
|
'(#:tests? #f
|
|
|
|
#:asd-systems '("cl-electron" "cl-electron/demos")
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'fix-paths
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
(substitute* "source/core.lisp"
|
|
|
|
(("\"electron\"")
|
|
|
|
(string-append "\"" (assoc-ref inputs "electron") "/bin/electron\""))))))))
|
2023-06-05 14:54:58 +02:00
|
|
|
(synopsis "Common Lisp interface to Electron")
|
|
|
|
(home-page "https://github.com/atlas-engineer/cl-electron")
|
|
|
|
(description "@command{cl-electron} is a binding to Electron for
|
|
|
|
Common Lisp.")
|
|
|
|
(license license:bsd-3))))
|
|
|
|
|
|
|
|
(define-public cl-electron
|
|
|
|
(sbcl-package->cl-source-package sbcl-cl-electron))
|
|
|
|
|
|
|
|
(define-public ecl-cl-electron
|
|
|
|
(sbcl-package->ecl-package sbcl-cl-electron))
|