all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#41689] Add cl-rdkafka
@ 2020-06-03 14:36 Katherine Cox-Buday
  2020-06-05 14:01 ` Guillaume Le Vaillant
  0 siblings, 1 reply; 7+ messages in thread
From: Katherine Cox-Buday @ 2020-06-03 14:36 UTC (permalink / raw)
  To: 41689

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0001-gnu-Add-cl-rdkafka.patch --]
[-- Type: text/x-patch, Size: 2539 bytes --]

From b8ff435def9372453d75067849da4541b6ec001b Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Wed, 3 Jun 2020 09:33:57 -0500
Subject: [PATCH] gnu: Add cl-rdkafka.

* gnu/packages/lisp-xyz.scm (sbcl-cl-rdkafka, cl-rdkafka, ecl-rdkafka):
  New variable.
---
 gnu/packages/lisp-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index b78eec7f4d..2472627c43 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -11555,3 +11555,50 @@ accompaniment to the standard ANSI facilities.")
 
 (define-public cl-osicat
   (sbcl-package->cl-source-package sbcl-osicat))
+
+(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))))))))
+    (inputs
+     `(("cffi" ,sbcl-cffi)
+       ("cffi" ,sbcl-cffi-grovel)
+       ("trivial-garbage" ,sbcl-trivial-garbage)
+       ("bordeaux-threads" ,sbcl-bordeaux-threads)
+       ;; Attempting to refer to the precompiled version gives:
+       ;; Error finding package for symbol "DECLARATION-INFORMATION":
+       ;; The name "SB-CLTL2" does not designate any package.
+       ("lparallel" ,cl-lparallel)))
+    (propagated-inputs
+     `(("librdkafka" ,librdkafka)))
+    (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))
+
+(define-public ecl-cl-rdkafka
+  (sbcl-package->ecl-package sbcl-cl-rdkafka))
-- 
2.26.2


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

* [bug#41689] Add cl-rdkafka
  2020-06-03 14:36 [bug#41689] Add cl-rdkafka Katherine Cox-Buday
@ 2020-06-05 14:01 ` Guillaume Le Vaillant
  2020-06-06 16:24   ` Katherine Cox-Buday
  0 siblings, 1 reply; 7+ messages in thread
From: Guillaume Le Vaillant @ 2020-06-05 14:01 UTC (permalink / raw)
  To: Katherine Cox-Buday; +Cc: 41689

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]


Hi,

Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis:

> (propagated-inputs
>  `(("librdkafka" ,librdkafka)))

Why is the librdkafka library a propagated input instead of a regular
input?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

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

* [bug#41689] Add cl-rdkafka
  2020-06-05 14:01 ` Guillaume Le Vaillant
@ 2020-06-06 16:24   ` Katherine Cox-Buday
  2020-06-07  9:17     ` Guillaume Le Vaillant
  0 siblings, 1 reply; 7+ messages in thread
From: Katherine Cox-Buday @ 2020-06-06 16:24 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: 41689

[-- Attachment #1: Type: text/plain, Size: 817 bytes --]

That is a mistake; there's no reason it can't be listed as a regular input.

During my tests to confirm this, I realized that sbcl-cl-rdkafka
wasn't actually producing any useful output. This led me down a
rabbit-hole (albeit a productive one). Below is a new patch set.

11:23 kate says: guix refresh -l sbcl-lparallel
Building the following 4 packages would ensure 8 dependent packages
are rebuilt: ecl-cl-rdkafka@1.0.2 cl-rdkafka@1.0.2
cl-random-forest@0.1-0.85fbdd4 next@1.5.0

All dependent packages continue to build.

On Fri, Jun 5, 2020 at 9:01 AM Guillaume Le Vaillant <glv@posteo.net> wrote:
>
>
> Hi,
>
> Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis:
>
> > (propagated-inputs
> >  `(("librdkafka" ,librdkafka)))
>
> Why is the librdkafka library a propagated input instead of a regular
> input?

[-- Attachment #2: 0002-gnu-Add-cl-rdkafka.patch --]
[-- Type: text/x-patch, Size: 2755 bytes --]

From 0a785df42a9c4c2693a1e952d3e253a0d8a552cb Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Wed, 3 Jun 2020 09:33:57 -0500
Subject: [PATCH 2/2] gnu: Add cl-rdkafka.

* gnu/packages/lisp-xyz.scm (sbcl-cl-rdkafka, cl-rdkafka, ecl-rdkafka):
  New variable.
---
 gnu/packages/lisp-xyz.scm | 51 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index b47d80b108..e9dbad7ce8 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -11566,3 +11566,54 @@ accompaniment to the standard ANSI facilities.")
 
 (define-public cl-osicat
   (sbcl-package->cl-source-package sbcl-osicat))
+
+(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
+     `(("cffi" ,sbcl-cffi)
+       ("cffi" ,sbcl-cffi-grovel)
+       ("trivial-garbage" ,sbcl-trivial-garbage)
+       ("bordeaux-threads" ,sbcl-bordeaux-threads)
+       ("lparallel" ,sbcl-lparallel)
+       ("librdkafka" ,librdkafka)))
+    (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))
+
+(define-public ecl-cl-rdkafka
+  (sbcl-package->ecl-package sbcl-cl-rdkafka))
-- 
2.26.2


[-- Attachment #3: 0001-gnu-lparallel-Modify-system-definition-to-require-sb.patch --]
[-- Type: text/x-patch, Size: 1435 bytes --]

From bfa07340a29c6e028584380f317c6c90d4529d00 Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Sat, 6 Jun 2020 11:18:00 -0500
Subject: [PATCH 1/2] gnu: lparallel: Modify system definition to require
 sb-cltl2

* gnu/packages/lisp-xyz.scm (sbcl-lparallel):
  Modify system definition to require sb-cltl2.
---
 gnu/packages/lisp-xyz.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index b78eec7f4d..b47d80b108 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -3197,6 +3197,17 @@ WebKit browsing engine.")
      `(("alexandria" ,sbcl-alexandria)
        ("bordeaux-threads" ,sbcl-bordeaux-threads)
        ("trivial-garbage" ,sbcl-trivial-garbage)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-dependency
+           ;; lparallel loads a SBCL specific system in its asd file. This is
+           ;; not carried over into the fasl which is generated. In order for
+           ;; it to be carried over, it needs to be listed as a dependency.
+           (lambda _
+             (substitute* "lparallel.asd"
+               ((":depends-on \\(:alexandria" all)
+                (string-append all " #+sbcl :sb-cltl2"))))))))
     (home-page "https://lparallel.org/")
     (synopsis "Parallelism for Common Lisp")
     (description
-- 
2.26.2


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

* [bug#41689] Add cl-rdkafka
  2020-06-06 16:24   ` Katherine Cox-Buday
@ 2020-06-07  9:17     ` Guillaume Le Vaillant
  2020-06-23 21:50       ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Guillaume Le Vaillant @ 2020-06-07  9:17 UTC (permalink / raw)
  To: Katherine Cox-Buday; +Cc: 41689

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]


Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis:

> That is a mistake; there's no reason it can't be listed as a regular input.
>
> During my tests to confirm this, I realized that sbcl-cl-rdkafka
> wasn't actually producing any useful output. This led me down a
> rabbit-hole (albeit a productive one). Below is a new patch set.
>
> 11:23 kate says: guix refresh -l sbcl-lparallel
> Building the following 4 packages would ensure 8 dependent packages
> are rebuilt: ecl-cl-rdkafka@1.0.2 cl-rdkafka@1.0.2
> cl-random-forest@0.1-0.85fbdd4 next@1.5.0
>
> All dependent packages continue to build.
>
> On Fri, Jun 5, 2020 at 9:01 AM Guillaume Le Vaillant <glv@posteo.net> wrote:
>>
>>
>> Hi,
>>
>> Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis:
>>
>> > (propagated-inputs
>> >  `(("librdkafka" ,librdkafka)))
>>
>> Why is the librdkafka library a propagated input instead of a regular
>> input?

Thanks. Patches pushed as 388a89750ec60a320dd7b6a0b0f174cbed4f50c6 and
64174aff927f4f9da18ea452247c838e6bab3306. Except I didn't push the
definition for ecl-cl-rdkafka because it didn't build (because of the
phase moving a file before the cleanup phase IIRC).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

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

* [bug#41689] Add cl-rdkafka
  2020-06-07  9:17     ` Guillaume Le Vaillant
@ 2020-06-23 21:50       ` Ludovic Courtès
  2020-06-23 22:26         ` Katherine Cox-Buday
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2020-06-23 21:50 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: Katherine Cox-Buday, 41689

Hi,

Guillaume Le Vaillant <glv@posteo.net> skribis:

>>> Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis:
>>>
>>> > (propagated-inputs
>>> >  `(("librdkafka" ,librdkafka)))
>>>
>>> Why is the librdkafka library a propagated input instead of a regular
>>> input?
>
> Thanks. Patches pushed as 388a89750ec60a320dd7b6a0b0f174cbed4f50c6 and
> 64174aff927f4f9da18ea452247c838e6bab3306. Except I didn't push the
> definition for ecl-cl-rdkafka because it didn't build (because of the
> phase moving a file before the cleanup phase IIRC).

Katherine, Guillaume: should we close this issue or wait for a fix for
ecl-cl-rdkafka?  (I guess the former.)

Thanks,
Ludo’.




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

* [bug#41689] Add cl-rdkafka
  2020-06-23 21:50       ` Ludovic Courtès
@ 2020-06-23 22:26         ` Katherine Cox-Buday
  2020-06-24 13:11           ` bug#41689: " Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Katherine Cox-Buday @ 2020-06-23 22:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guillaume Le Vaillant, 41689

[-- Attachment #1: Type: text/plain, Size: 908 bytes --]

Closing is fine. I won't have time in the near future to get the ecl
package working. Thanks ludo!

On Tue, Jun 23, 2020, 16:50 Ludovic Courtès <ludo@gnu.org> wrote:

> Hi,
>
> Guillaume Le Vaillant <glv@posteo.net> skribis:
>
> >>> Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis:
> >>>
> >>> > (propagated-inputs
> >>> >  `(("librdkafka" ,librdkafka)))
> >>>
> >>> Why is the librdkafka library a propagated input instead of a regular
> >>> input?
> >
> > Thanks. Patches pushed as 388a89750ec60a320dd7b6a0b0f174cbed4f50c6 and
> > 64174aff927f4f9da18ea452247c838e6bab3306. Except I didn't push the
> > definition for ecl-cl-rdkafka because it didn't build (because of the
> > phase moving a file before the cleanup phase IIRC).
>
> Katherine, Guillaume: should we close this issue or wait for a fix for
> ecl-cl-rdkafka?  (I guess the former.)
>
> Thanks,
> Ludo’.
>

[-- Attachment #2: Type: text/html, Size: 1471 bytes --]

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

* bug#41689: Add cl-rdkafka
  2020-06-23 22:26         ` Katherine Cox-Buday
@ 2020-06-24 13:11           ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2020-06-24 13:11 UTC (permalink / raw)
  To: Katherine Cox-Buday; +Cc: Guillaume Le Vaillant, 41689-done

Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis:

> Closing is fine. I won't have time in the near future to get the ecl
> package working. Thanks ludo!

Cool, done.  Thank you!

Ludo’.




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

end of thread, other threads:[~2020-06-24 13:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-03 14:36 [bug#41689] Add cl-rdkafka Katherine Cox-Buday
2020-06-05 14:01 ` Guillaume Le Vaillant
2020-06-06 16:24   ` Katherine Cox-Buday
2020-06-07  9:17     ` Guillaume Le Vaillant
2020-06-23 21:50       ` Ludovic Courtès
2020-06-23 22:26         ` Katherine Cox-Buday
2020-06-24 13:11           ` bug#41689: " Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.