unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/4] gnu: Add librdkafka.
@ 2016-06-07 13:56 宋文武
  2016-06-10 12:31 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: 宋文武 @ 2016-06-07 13:56 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/packages/networking.scm (librdkafka): New variable.
---
 gnu/packages/networking.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ba8023a..d0062a6 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -149,6 +149,43 @@ filtering (subscriptions), seamless access to multiple transport protocols and
 more.")
     (license license:lgpl3+)))
 
+(define-public librdkafka
+  (package
+    (name "librdkafka")
+    (version "0.9.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/edenhill/librdkafka/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "10ldx7g7ymmg17snzx78vy4n8ma1rjx0agzi34g15j2fk867xmas"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               ;; librdkafka++.so lacks RUNPATH for librdkafka.so
+               (setenv "LDFLAGS"
+                       (string-append "-Wl,-rpath=" out "/lib"))
+               (zero? (system* "./configure"
+                               (string-append "--prefix=" out)))))))))
+    (native-inputs
+     `(("python" ,python-wrapper)))
+    (propagated-inputs
+     `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc
+    (home-page "https://github.com/edenhill/librdkafka")
+    (synopsis "Apache Kafka C/C++ client library")
+    (description
+     "librdkafka is a C library implementation of the Apache Kafka protocol,
+containing both Producer and Consumer support.")
+    (license license:bsd-2)))
+
 (define-public libndp
   (package
     (name "libndp")
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] gnu: Add librdkafka.
  2016-06-07 13:56 [PATCH 1/4] gnu: Add librdkafka 宋文武
@ 2016-06-10 12:31 ` Ludovic Courtès
  2016-06-11  4:53   ` 宋文武
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2016-06-10 12:31 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> * gnu/packages/networking.scm (librdkafka): New variable.

LGTM!

> +    (propagated-inputs
> +     `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc

It’s OK to do it this way, but I find it even nicer to modify the .pc to
add an extra -L (see ‘ipopt’ for an example of that.)

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] gnu: Add librdkafka.
  2016-06-10 12:31 ` Ludovic Courtès
@ 2016-06-11  4:53   ` 宋文武
  0 siblings, 0 replies; 3+ messages in thread
From: 宋文武 @ 2016-06-11  4:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Pushed, thanks for the review!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-11  4:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07 13:56 [PATCH 1/4] gnu: Add librdkafka 宋文武
2016-06-10 12:31 ` Ludovic Courtès
2016-06-11  4:53   ` 宋文武

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).