gnu: Add chanl.

* gnu/packages/lisp.scm (sbcl-chanl, cl-chanl, ecl-chanl): New variables.
This commit is contained in:
Guillaume Le Vaillant 2019-10-01 10:55:24 +02:00 committed by Pierre Neidhardt
parent d24d980e8e
commit d3287fc157
No known key found for this signature in database
GPG Key ID: 9BDCF497A4BBCC7F
1 changed files with 54 additions and 0 deletions

View File

@ -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))))))