aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/lisp.scm
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2019-10-01 10:55:24 +0200
committerPierre Neidhardt <mail@ambrevar.xyz>2019-10-06 14:19:03 +0200
commitd3287fc157e98a0f5d13f2e12e06fb8660711e73 (patch)
tree83c6f50bda17707444d2c16ee8eef8cebc002de8 /gnu/packages/lisp.scm
parentd24d980e8e649911ec551530b58519e8d9995c69 (diff)
downloadpatches-d3287fc157e98a0f5d13f2e12e06fb8660711e73.tar
patches-d3287fc157e98a0f5d13f2e12e06fb8660711e73.tar.gz
gnu: Add chanl.
* gnu/packages/lisp.scm (sbcl-chanl, cl-chanl, ecl-chanl): New variables.
Diffstat (limited to 'gnu/packages/lisp.scm')
-rw-r--r--gnu/packages/lisp.scm54
1 files changed, 54 insertions, 0 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 2939fdc4ed..80ceb95271 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -7348,3 +7348,57 @@ compression/decompression using bindings to the lzlib C library.")
(define-public ecl-lzlib
(sbcl-package->ecl-package sbcl-lzlib))
+
+(define-public sbcl-chanl
+ (let ((commit "2362b57550c2c9238cc882d03553aaa1040b7340")
+ (revision "0"))
+ (package
+ (name "sbcl-chanl")
+ (version (git-version "0.4.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/zkat/chanl.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ag3wz7yrqwp0s5069wwda98z3rrqd25spg8sa8rdqghj084w28w"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ `(("fiveam" ,sbcl-fiveam)))
+ (inputs
+ `(("bordeaux-threads" ,sbcl-bordeaux-threads)))
+ (synopsis "Portable channel-based concurrency for Common Lisp")
+ (description "Common Lisp library for channel-based concurrency. In
+a nutshell, you create various threads sequentially executing tasks you need
+done, and use channel objects to communicate and synchronize the state of these
+threads.")
+ (home-page "https://github.com/zkat/chanl")
+ (license (list license:expat license:bsd-3)))))
+
+(define-public cl-chanl
+ (sbcl-package->cl-source-package sbcl-chanl))
+
+(define-public ecl-chanl
+ (let ((base (sbcl-package->ecl-package sbcl-chanl)))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ;; The CHANL.ACTORS package uses the :ARGUMENTS option of
+ ;; DEFINE-METHOD-COMBINATION, which is not implemented in ECL yet
+ ;; (see https://gitlab.com/embeddable-common-lisp/ecl/issues/305).
+ ;; So let's disable it for now, as it allows compiling the library
+ ;; and using the rest of it.
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'disable-chanl-actors
+ (lambda _
+ (substitute* "chanl.asd"
+ (("\\(:file \"actors\"\\)") ""))
+ #t))))
+ ;; Disable the tests for now, as the SEND-SEQUENCE test seems to
+ ;; never end.
+ ((#:tests? _ #f) #f))))))