summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatherine Cox-Buday <cox.katherine.e@gmail.com>2020-06-07 10:56:59 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2020-06-07 11:05:04 +0200
commit64174aff927f4f9da18ea452247c838e6bab3306 (patch)
treec2c8a4687d344c258c13d8bcf6742970b1405881
parent5dc04da4dfa5330cd634f7a6dddc3fcdfe102f8a (diff)
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>
-rw-r--r--gnu/packages/lisp-xyz.scm48
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index d8009c2638..0bf2dec44d 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -11938,3 +11938,51 @@ tables.")
(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))