GNU bug report logs -
#73170
[PATCH] gnu: Add cl-async-process.
Previous Next
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.
Full log
View this message in rfc822 format
[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)]
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.