GNU bug report logs - #73430
[PATCH] gnu: Add guile-taglib.

Previous Next

Package: guix-patches;

Reported by: Alec Barreto <mrh57 <at> posteo.net>

Date: Sun, 22 Sep 2024 20:57:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

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 73430 in the body.
You can then email your comments to 73430 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 guix-patches <at> gnu.org:
bug#73430; Package guix-patches. (Sun, 22 Sep 2024 20:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alec Barreto <mrh57 <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 22 Sep 2024 20:57:02 GMT) Full text and rfc822 format available.

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

From: Alec Barreto <mrh57 <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Alec Barreto <mrh57 <at> posteo.net>
Subject: [PATCH] gnu: Add guile-taglib.
Date: Sun, 22 Sep 2024 20:45:41 +0000
* gnu/packages/guile-xyz.scm (guile-taglib): New variable.

Change-Id: I68cb1945104b64f621c9e6a1689b63f66c59144e
---

This project has neither git tags nor releases, so I just filled in values of "0" for version and revision.
Do let me know if there's something else that would be better.

Separately, is there a reason why the =guile= package doesn't have "GUILE_EXTENSIONS_PATH" set in its =native-search-paths= field so that it can find foreign libs?
The "libtag_c.so" path has to be patched here (and similar patches exist in other guile packages).
Shouldn't the "lib" dir of the profile just be added to that guile path, rendering all these patches unnecessary?

Best,
Alec

 gnu/packages/guile-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 27a30e6622..b19fd443ea 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -104,6 +104,7 @@ (define-module (gnu packages guile-xyz)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mes)
+  #:use-module (gnu packages mp3)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages networking)
@@ -1052,6 +1053,40 @@ (define-public guile-swayer
 events in Guile.")
     (license license:expat)))
 
+(define-public guile-taglib
+  (let ((commit "c056ac9eb375459c53284aa20f35b0778cfa3cea")
+        (version "0")
+        (revision "0"))
+    (package
+      (name "guile-taglib")
+      (version (git-version version revision commit))
+      (home-page "https://github.com/sbarbit/guile-taglib")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/sbarbit/guile-taglib")
+               (commit commit)))
+         (sha256
+          (base32 "07z65hqxjm6rd9cdk2b9dcxj8hgz7c9dg4iprr19jrvj4ymzrbff"))))
+      (build-system guile-build-system)
+      (native-inputs (list guile-3.0))
+      (propagated-inputs (list taglib))
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'fix-taglib-path
+              (lambda* (#:key inputs #:allow-other-keys)
+                (substitute* "taglib.scm"
+                  (("libtag_c.so")
+                   (search-input-file inputs "/lib/libtag_c.so"))))))))
+      (synopsis "Guile bindings for the taglib library")
+      (description
+       "This package provides Guile bindings for the taglib C library.
+It can be used to access and modify metadata for audio files.")
+      (license license:gpl2+))))
+
 (define-public guile-syntax-highlight
   (package
     (name "guile-syntax-highlight")
-- 
2.46.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 17 Nov 2024 21:51:02 GMT) Full text and rfc822 format available.

Notification sent to Alec Barreto <mrh57 <at> posteo.net>:
bug acknowledged by developer. (Sun, 17 Nov 2024 21:51:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Alec Barreto <mrh57 <at> posteo.net>
Cc: 73430-done <at> debbugs.gnu.org
Subject: Re: [bug#73430] [PATCH] gnu: Add guile-taglib.
Date: Sun, 17 Nov 2024 22:49:56 +0100
[Message part 1 (text/plain, inline)]
Hi,

Alec Barreto <mrh57 <at> posteo.net> skribis:

> * gnu/packages/guile-xyz.scm (guile-taglib): New variable.
>
> Change-Id: I68cb1945104b64f621c9e6a1689b63f66c59144e

Applied with the change below.

> Separately, is there a reason why the =guile= package doesn't have "GUILE_EXTENSIONS_PATH" set in its =native-search-paths= field so that it can find foreign libs?

No good reason, it should probably have that.

> The "libtag_c.so" path has to be patched here (and similar patches exist in other guile packages).
> Shouldn't the "lib" dir of the profile just be added to that guile path, rendering all these patches unnecessary?

Hmm yes you’re right.  I’m used to specifying absolute file names, but
just setting ‘GUILE_EXTENSIONS_PATH’ would be equally good.

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index c4d06e10f0..044a491259 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1077,6 +1077,7 @@ (define-public guile-taglib
          (uri (git-reference
                (url "https://github.com/sbarbit/guile-taglib")
                (commit commit)))
+         (file-name (git-file-name name version))
          (sha256
           (base32 "07z65hqxjm6rd9cdk2b9dcxj8hgz7c9dg4iprr19jrvj4ymzrbff"))))
       (build-system guile-build-system)

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 16 Dec 2024 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 264 days ago.

Previous Next


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