gnu: Add cl-rdkafka.

* gnu/packages/lisp-xyz.scm (sbcl-cl-rdkafka, cl-rdkafka): New variables.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
This commit is contained in:
Katherine Cox-Buday 2020-06-07 10:56:59 +02:00 committed by Guillaume Le Vaillant
parent 5dc04da4df
commit 64174aff92
No known key found for this signature in database
GPG key ID: 6BE8208ADF21FE3F

View file

@ -11938,3 +11938,51 @@ (define-public cl-ascii-table
(define-public ecl-cl-ascii-table
(sbcl-package->ecl-package sbcl-cl-ascii-table))
(define-public sbcl-cl-rdkafka
(package
(name "sbcl-cl-rdkafka")
(version "1.0.2")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/SahilKang/cl-rdkafka.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1qcgfd4h7syilzmrmd4z2vknbvawda3q3ykw7xm8n381syry4g82"))))
(build-system asdf-build-system/sbcl)
(arguments
`(#:tests? #f ; Attempts to connect to locally running Kafka
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/low-level/librdkafka-bindings.lisp"
(("librdkafka" all)
(string-append (assoc-ref inputs "librdkafka") "/lib/"
all)))))
(add-before 'cleanup 'move-bundle
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(actual (string-append out "/lib/sbcl/src/cl-rdkafka.fasl"))
(expected (string-append
out "/lib/sbcl/cl-rdkafka--system.fasl")))
(copy-file actual expected)
#t))))))
(inputs
`(("bordeaux-threads" ,sbcl-bordeaux-threads)
("cffi" ,sbcl-cffi)
("cffi-grovel" ,sbcl-cffi-grovel)
("librdkafka" ,librdkafka)
("lparallel" ,sbcl-lparallel)
("trivial-garbage" ,sbcl-trivial-garbage)))
(home-page "https://github.com/SahilKang/cl-rdkafka")
(synopsis "Common Lisp client library for Apache Kafka")
(description "A Common Lisp client library for Apache Kafka.")
(license license:gpl3)))
(define-public cl-rdkafka
(sbcl-package->cl-source-package sbcl-cl-rdkafka))