[PATCH] gnu: guile-libyaml: Improve packaging.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Evgeny Pisemsky
Owner
unassigned
Submitted by
Evgeny Pisemsky
Severity
normal

Debbugs page

Evgeny Pisemsky wrote 5 days ago
(address . guix-patches@gnu.org)
b1eb48ee56175d396bc99f17ee067d39bb30f7e3.1741432344.git.mail@pisemsky.site
* gnu/packages/guile-xyz.scm (guile-libyaml): Run guix style.
[version]: Specify semantic version.
[source]: Use version tag, add deletion snippet.
[build-system]: Use guile-build-system.
[arguments]: Use gexps, clean up phases, disable auto compile.
[native-inputs]: Add gcc, guile-3.0, nyacc.
[inputs]: Remove guile-3.0.

Change-Id: Id064f0cde60606a8f2bad8c903e840a9fa50376d
---
gnu/packages/guile-xyz.scm | 88 ++++++++++++++++----------------------
1 file changed, 37 insertions(+), 51 deletions(-)

Toggle diff (110 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index e220f897ad..cc74591604 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -88,6 +88,7 @@ (define-module (gnu packages guile-xyz)
#:use-module (gnu packages emacs)
#:use-module (gnu packages emacs-xyz)
#:use-module (gnu packages gawk)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
@@ -6218,57 +6219,42 @@ (define-public guile-drmaa
(license license:gpl3+)))
(define-public guile-libyaml
- (let ((commit "2bdacb72a65ab63264b2edc9dac9692df7ec9b3e")
- (revision "2"))
- (package
- (name "guile-libyaml")
- (version (git-version "0" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/mwette/guile-libyaml")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1bssby1ri1vjll2rvi8b33xr2ghwjyxsd4yc15najj3h8n2ss87i"))))
- (build-system gnu-build-system)
- (arguments
- `(#:modules (((guix build guile-build-system)
- #:prefix guile:)
- ,@%default-gnu-modules)
- #:imported-modules ((guix build guile-build-system)
- ,@%default-gnu-imported-modules)
- #:tests? #false ; there are none
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (add-after 'unpack 'remove-unused-files
- (lambda* (#:key inputs #:allow-other-keys)
- (for-each delete-file '("guix.scm" "demo1.yml" "demo1.scm"))))
- (add-before 'build 'build-ffi
- (lambda* (#:key inputs #:allow-other-keys)
- (invoke "guild" "compile-ffi"
- "--no-exec" ; allow us to patch the generated file
- "yaml/libyaml.ffi")
- (substitute* "yaml/libyaml.scm"
- (("dynamic-link \"libyaml\"")
- (format #false "dynamic-link \"~a/lib/libyaml\""
- (assoc-ref inputs "libyaml"))))))
- (replace 'build
- (assoc-ref guile:%standard-phases 'build))
- (delete 'install))))
- (inputs
- (list guile-3.0 libyaml))
- (propagated-inputs
- (list guile-bytestructures nyacc))
- (home-page "https://github.com/mwette/guile-libyaml")
- (synopsis "Guile wrapper for libyaml")
- (description
- "This package provides a simple yaml module for Guile using the
-ffi-helper from nyacc.")
- (license license:lgpl3+))))
+ (package
+ (name "guile-libyaml")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mwette/guile-libyaml")
+ (commit (string-append "V" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1bssby1ri1vjll2rvi8b33xr2ghwjyxsd4yc15najj3h8n2ss87i"))
+ (snippet #~(for-each delete-file
+ '("guix.scm" "demo1.yml" "demo1.scm")))))
+ (build-system guile-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'build-ffi
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "GUILE_AUTO_COMPILE" "0")
+ (invoke "guild" "compile-ffi" "--no-exec" "yaml/libyaml.ffi")
+ (substitute* "yaml/libyaml.scm"
+ (("dynamic-link \"libyaml\"")
+ (format #f "dynamic-link \"~a/lib/libyaml\""
+ (assoc-ref inputs "libyaml")))))))))
+ (native-inputs (list gcc guile-3.0 nyacc))
+ (inputs (list libyaml))
+ (propagated-inputs (list guile-bytestructures nyacc))
+ (home-page "https://github.com/mwette/guile-libyaml")
+ (synopsis "Guile wrapper for libyaml")
+ (description
+ "This package provides a simple yaml module for Guile using the ffi-helper from
+nyacc.")
+ (license license:lgpl3+)))
(define-public schmutz
(let ((commit "f8043e6c258d2e29d153bc37cb17b130fee0579f")

base-commit: 42bc94adbd1114771ef14a8e19563829ae355e87
--
2.48.1
Ludovic Courtès wrote 4 days ago
(name . Evgeny Pisemsky)(address . mail@pisemsky.site)(address . 76863-done@debbugs.gnu.org)
87r035q43g.fsf@gnu.org
Evgeny Pisemsky <mail@pisemsky.site> skribis:

Toggle quote (10 lines)
> * gnu/packages/guile-xyz.scm (guile-libyaml): Run guix style.
> [version]: Specify semantic version.
> [source]: Use version tag, add deletion snippet.
> [build-system]: Use guile-build-system.
> [arguments]: Use gexps, clean up phases, disable auto compile.
> [native-inputs]: Add gcc, guile-3.0, nyacc.
> [inputs]: Remove guile-3.0.
>
> Change-Id: Id064f0cde60606a8f2bad8c903e840a9fa50376d

Applied, thanks!
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76863@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76863
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help