Subject: bug#42528: closed (Re: [bug#42528] [PATCH] gnu: beets: Support replaygain plugin)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 25 Jul 2020 16:48:02 +0000

Your bug report

#42528: [PATCH] gnu: beets: Support replaygain plugin

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
42528: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42528
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#42528] [PATCH] gnu: beets: Support replaygain plugin
From: Marius Bakke <[email-masked]>
To: Lars-Dominik Braun <[email-masked]>, [email-masked]
Date: Sat, 25 Jul 2020 18:47:10 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Lars-Dominik Braun <[email-masked]> writes:

> * gnu/packages/music.scm (beets)[arguments]: Add 'wrap-typelib phase
> [inputs]: Add gstreamer, plugins and python-pygobject

I adjusted the commit message to have punctuations and mention all the
added inputs.

Applied, thanks!

Subject: [PATCH] gnu: beets: Support replaygain plugin
From: Lars-Dominik Braun <[email-masked]>
To: [email-masked]
Date: Sat, 25 Jul 2020 10:37:16 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/music.scm (beets)[arguments]: Add 'wrap-typelib phase
[inputs]: Add gstreamer, plugins and python-pygobject
---
 gnu/packages/music.scm | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index fcdacb66be..f4cecb07ca 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3024,7 +3024,19 @@ websites such as Libre.fm.")
              #t))
          (replace 'check
            (lambda _
-             (invoke "nosetests" "-v"))))))
+             (invoke "nosetests" "-v")))
+         ;; Wrap the executable, so it can find python-gi (aka pygobject) and
+         ;; gstreamer plugins.
+         (add-after 'wrap 'wrap-typelib
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((prog (string-append (assoc-ref outputs "out")
+                                        "/bin/beet"))
+                   (plugins (getenv "GST_PLUGIN_SYSTEM_PATH"))
+                   (types (getenv "GI_TYPELIB_PATH")))
+               (wrap-program prog
+                 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,plugins))
+                 `("GI_TYPELIB_PATH" ":" prefix (,types)))
+               #t))))))
     (native-inputs
      `(("python-beautifulsoup4" ,python-beautifulsoup4)
        ("python-flask" ,python-flask)
@@ -3045,7 +3057,13 @@ websites such as Libre.fm.")
        ("python-mutagen" ,python-mutagen)
        ("python-pyacoustid" ,python-pyacoustid)
        ("python-pyyaml" ,python-pyyaml)
-       ("python-unidecode" ,python-unidecode)))
+       ("python-unidecode" ,python-unidecode)
+       ;; For plugin replaygain.
+       ("python-pygobject" ,python-pygobject)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gst-plugins-base" ,gst-plugins-base)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("gstreamer" ,gstreamer)))
     (home-page "https://beets.io")
     (synopsis "Music organizer")
     (description "The purpose of beets is to get your music collection right
-- 
2.26.2