GNU bug report logs - #73170
[PATCH] gnu: Add cl-async-process.

Previous Next

Package: guix-patches;

Reported by: jgart <jgart <at> dismail.de>

Date: Tue, 10 Sep 2024 16:22:01 UTC

Severity: normal

Tags: patch

Done: "jgart" <jgart <at> dismail.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73170 in the body.
You can then email your comments to 73170 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to glv <at> posteo.net, cox.katherine.e+guix <at> gmail.com, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#73170; Package guix-patches. (Tue, 10 Sep 2024 16:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to jgart <jgart <at> dismail.de>:
New bug report received and forwarded. Copy sent to glv <at> posteo.net, cox.katherine.e+guix <at> gmail.com, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, jgart <at> dismail.de, guix-patches <at> gnu.org. (Tue, 10 Sep 2024 16:22:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: guix-patches <at> gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH] gnu: Add cl-async-process.
Date: Tue, 10 Sep 2024 11:20:44 -0500
* gnu/packages/lisp-xyz.scm (cl-async-process, ecl-async-process,
sbcl-async-process): New variables.

Change-Id: I4e4707ffa30b6fcd1267e681f71a874c790746f4
---
 gnu/packages/lisp-xyz.scm | 75 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 02eb3514ee..eaaaa17f99 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -81,6 +81,7 @@ (define-module (gnu packages lisp-xyz)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system emacs)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages c)
   #:use-module (gnu packages compression)
@@ -2850,6 +2851,80 @@ (define-public cl-cells
 (define-public ecl-cells
   (sbcl-package->ecl-package sbcl-cells))
 
+(define (async-process-origin commit name version)
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url "https://github.com/lem-project/async-process")
+          (commit commit)))
+    (file-name (git-file-name name version))
+    (sha256
+     (base32 "1m2sfgfg6c0gqqy1pqsahsiw3j25y473mfw7sx0akkqbhwhm7mjb"))
+    (modules '((guix build utils)))
+    (snippet
+     ;; Delete precompiled artifacts.
+     `(begin
+        (for-each delete-file-recursively
+                  (list "static"
+                        "static_old0001-819cbf6"))))))
+
+(define async-process-c-sources
+  (let ((commit "9690530fc92b59636d9f17d821afa7697e7c8ca4")
+        (revision "0"))
+    (package
+      (name "async-process-c-sources")
+      (version (git-version "0.0.1" revision commit))
+      (source (async-process-origin commit name version))
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (replace 'bootstrap
+              (lambda _
+                (invoke "libtoolize")
+                (invoke "aclocal")
+                (invoke "autoheader")
+                (invoke "automake" "-a")
+                (invoke "autoconf"))))))
+      (native-inputs (list autoconf automake libtool))
+      (home-page "https://github.com/lem-project/async-process")
+      (synopsis "Asynchronous process execution for Common Lisp")
+      (description "This library provides an asynchronous process
+execution mechanism for Common Lisp.")
+      (license license:expat))))
+
+(define-public sbcl-async-process
+  (let ((commit "9690530fc92b59636d9f17d821afa7697e7c8ca4")
+        (revision "0"))
+    (package
+      (name "sbcl-async-process")
+      (version (git-version "0.0.1" revision commit))
+      (source (async-process-origin commit name version))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'fix-paths
+              (lambda* (#:key inputs #:allow-other-keys)
+                (substitute* "src/async-process.lisp"
+                  (("libasyncprocess\\.so")
+                   (search-input-file inputs
+                                      "/lib/async-process/libasyncprocess.so"))))))))
+      (inputs (list async-process-c-sources sbcl-cffi))
+      (home-page "https://github.com/lem-project/async-process")
+      (synopsis "Asynchronous process execution for Common Lisp")
+      (description "This library provides an asynchronous process
+execution mechanism for Common Lisp.")
+      (license license:expat))))
+
+(define-public cl-async-process
+  (sbcl-package->cl-source-package sbcl-async-process))
+
+(define-public ecl-async-process
+  (sbcl-package->ecl-package sbcl-async-process))
+
 (define-public sbcl-cephes
   (let ((commit "d87146fa38c8425ffb5fe425eee5eb3e818bacd4")
         (revision "0"))

base-commit: f977cb2b609f7122db2cf026cac5ab9d6d44a206
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#73170; Package guix-patches. (Tue, 10 Sep 2024 16:42:02 GMT) Full text and rfc822 format available.

Message #8 received at 73170 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 73170 <at> debbugs.gnu.org
Cc: Guillaume Le Vaillant <glv <at> posteo.net>, jgart <jgart <at> dismail.de>
Subject: Re: [PATCH] gnu: Add cl-async-process.
Date: Tue, 10 Sep 2024 11:41:31 -0500
Hi Guillaume,

Would you be able to review this one? This package is a dependency of
the lem text editor.

To give some context, this package has C source code that needs to be
compiled.

There is a bootstrap script in the root of the project repository that
does too much. It also runs configure and make, for example.

https://github.com/lem-project/async-process/issues/21

Thanks!
-- 
all the best,
jgart




Information forwarded to guix-patches <at> gnu.org:
bug#73170; Package guix-patches. (Tue, 17 Sep 2024 13:18:01 GMT) Full text and rfc822 format available.

Message #11 received at 73170 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: jgart <jgart <at> dismail.de>
Cc: 73170 <at> debbugs.gnu.org
Subject: Re: [bug#73170] [PATCH] gnu: Add cl-async-process.
Date: Tue, 17 Sep 2024 13:16:36 +0000
[Message part 1 (text/plain, inline)]
Hi.

jgart <jgart <at> dismail.de> skribis:

> +(define (async-process-origin commit name version)
> +  (origin
> +    (method git-fetch)
> +    (uri (git-reference
> +          (url "https://github.com/lem-project/async-process")
> +          (commit commit)))
> +    (file-name (git-file-name name version))
> +    (sha256
> +     (base32 "1m2sfgfg6c0gqqy1pqsahsiw3j25y473mfw7sx0akkqbhwhm7mjb"))
> +    (modules '((guix build utils)))
> +    (snippet
> +     ;; Delete precompiled artifacts.
> +     `(begin
> +        (for-each delete-file-recursively
> +                  (list "static"
> +                        "static_old0001-819cbf6"))))))

I don't think this function is necessary; and the sha256 hash is fixed
here but it would in fact depend on the commit passed as argument to the
function.


> +(define async-process-c-sources
> +  (let ((commit "9690530fc92b59636d9f17d821afa7697e7c8ca4")
> +        (revision "0"))
> +    (package
> +      (name "async-process-c-sources")
> +      (version (git-version "0.0.1" revision commit))
> +      (source (async-process-origin commit name version))
> +      (build-system gnu-build-system)
> +      (arguments
> +       (list
> +        #:phases
> +        #~(modify-phases %standard-phases
> +            (replace 'bootstrap
> +              (lambda _
> +                (invoke "libtoolize")
> +                (invoke "aclocal")
> +                (invoke "autoheader")
> +                (invoke "automake" "-a")
> +                (invoke "autoconf"))))))
> +      (native-inputs (list autoconf automake libtool))
> +      (home-page "https://github.com/lem-project/async-process")
> +      (synopsis "Asynchronous process execution for Common Lisp")
> +      (description "This library provides an asynchronous process
> +execution mechanism for Common Lisp.")
> +      (license license:expat))))

So I would rather put the 'origin' field in this package building the
C library. And as the purpose of this package is to build the
libasyncprocess library, I would just call it "libasyncprocess".


> +(define-public sbcl-async-process
> +  (let ((commit "9690530fc92b59636d9f17d821afa7697e7c8ca4")
> +        (revision "0"))
> +    (package
> +      (name "sbcl-async-process")
> +      (version (git-version "0.0.1" revision commit))
> +      (source (async-process-origin commit name version))
> +      (build-system asdf-build-system/sbcl)
> +      (arguments
> +       (list
> +        #:phases
> +        #~(modify-phases %standard-phases
> +            (add-after 'unpack 'fix-paths
> +              (lambda* (#:key inputs #:allow-other-keys)
> +                (substitute* "src/async-process.lisp"
> +                  (("libasyncprocess\\.so")
> +                   (search-input-file inputs
> +                                      "/lib/async-process/libasyncprocess.so"))))))))
> +      (inputs (list async-process-c-sources sbcl-cffi))
> +      (home-page "https://github.com/lem-project/async-process")
> +      (synopsis "Asynchronous process execution for Common Lisp")
> +      (description "This library provides an asynchronous process
> +execution mechanism for Common Lisp.")
> +      (license license:expat))))

Then the sbcl-async-process package could be simplified by inheriting
from the libasyncprocess package, and modifying the 'name',
'build-system', 'inputs' and 'arguments' fields.
[signature.asc (application/pgp-signature, inline)]

Reply sent to "jgart" <jgart <at> dismail.de>:
You have taken responsibility. (Thu, 26 Sep 2024 06:55:02 GMT) Full text and rfc822 format available.

Notification sent to jgart <jgart <at> dismail.de>:
bug acknowledged by developer. (Thu, 26 Sep 2024 06:55:02 GMT) Full text and rfc822 format available.

Message #16 received at 73170-done <at> debbugs.gnu.org (full text, mbox):

From: "jgart" <jgart <at> dismail.de>
To: 73170-done <at> debbugs.gnu.org, "Guillaume Le Vaillant" <glv <at> posteo.net>
Subject: Re: [PATCH] gnu: Add cl-async-process.
Date: Thu, 26 Sep 2024 06:54:11 +0000
Hi Guillaume,

I added your requested changes and pushed the patch in the following commit:

5955c2aebc95f5ba7a75a92e2c045af8ea56685b

Closing this issue now. Thanks for the review!

all the best,

jgart




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 Oct 2024 11:24:21 GMT) Full text and rfc822 format available.

This bug report was last modified 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.