[PATCH] gnu: Add chanl.

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Pierre Neidhardt
Owner
unassigned
Submitted by
Guillaume Le Vaillant
Severity
normal
G
G
Guillaume Le Vaillant wrote on 1 Oct 2019 10:55
(address . guix-patches@gnu.org)(name . Guillaume Le Vaillant)(address . glv@posteo.net)
20191001085524.22204-1-glv@posteo.net
* gnu/packages/lisp.scm (sbcl-chanl, cl-chanl, ecl-chanl): New variables.
---
gnu/packages/lisp.scm | 54 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index ba009bb7a6..fd46b967e7 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -7360,3 +7360,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))))))
--
2.23.0
P
P
Pierre Neidhardt wrote on 6 Oct 2019 14:21
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 37566@debbugs.gnu.org)
87imp2gj3v.fsf@ambrevar.xyz
Merged in d3287fc157e98a0f5d13f2e12e06fb8660711e73, thanks!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2Z3EQACgkQm9z0l6S7
zH/HuggAoOMa1yOpKh5UoUxOreeVYKCJhb0biknznwHqu9Wpuy14bVeeuENwHI8a
GUhcQmdpwLbV2KhZT93c+KaINDgrh+/8iqGCR4uutHRfNoTWd9jZClsX7smzbZZ7
7+c7/RBxX3Xozf0FFuXuyIjCisJ8LwtWUZetuZdN/IPsr4F+0lFZ8Yjx0kzmRUAT
n5juSy42EF2espxnGxPkW64fZgWEMyV3gyUi9xNQhjj4MHkH+zKkdgq/GyrGsinU
HIMVT4K90JHtDYYkB/npkm5SPwlJRKnFhNW/oFaWtf6cvK3FmpDbNYyT9JL3yYqh
8VplLTRALZJfYCI/cutovQMpxDhbDQ==
=4UCc
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 6 Oct 2019 14:21
control message for bug #37566
(address . control@debbugs.gnu.org)
87ftk6gj3f.fsf@ambrevar.xyz
close 37566
quit
?