diff mbox series

[bug#55516,v2] gnu: Add quodlibet.

Message ID 20220528085718.27307-1-remco@remworks.net
State Accepted
Headers show
Series [bug#55516,v2] gnu: Add quodlibet. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Remco van 't Veer May 28, 2022, 8:57 a.m. UTC
* gnu/packages/music.scm (quodlibet): New variable.
---
 gnu/packages/music.scm | 94 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)

Comments

Liliana Marie Prikler May 28, 2022, 11:13 a.m. UTC | #1
Am Samstag, dem 28.05.2022 um 10:57 +0200 schrieb Remco van 't Veer:
> * gnu/packages/music.scm (quodlibet): New variable.
Cleaned up and pushed.

Cheers
M May 28, 2022, 12:36 p.m. UTC | #2
Remco van 't Veer schreef op za 28-05-2022 om 10:57 [+0200]:
> [...]
> +         (add-after 'install 'wrap-gi-typelib ; GObject Introspection
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
> +               (for-each (lambda (prog)
> +                           (wrap-program (string-append out "/bin/" prog)
> +                             `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
> +                         '("exfalso" "quodlibet")))
> [...]
> +
> +    (native-inputs [...])
> +    (inputs [...])

bash-minimal (which is required when wrap-program is used for cross-
compilation reasons) is missing from inputs.  For future reference,
this issue would be detected by "guix lint".  There were some other
suboptimalities too (trailing #t, unconditional #:tests? #true), but
they have been corrected by Liliana in
<https://git.savannah.gnu.org/cgit/guix.git/commit/?id=092ec158f73b0f4a4817517149e4cb49b2d8e490>

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index b224a145d5..7db6c2a037 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -45,6 +45,7 @@ 
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;; Copyright © 2021 Thomas Albers Raviola <thomas@thomaslabs.org>
 ;;; Copyright © 2022 Sughosha <sughosha@disroot.org>
+;;; Copyright © 2022 Remco van 't Veer <remco@remworks.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -153,6 +154,7 @@  (define-module (gnu packages music)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio) ;libsndfile
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-compression)
   #:use-module (gnu packages python-web)
@@ -6878,3 +6880,95 @@  (define-public musikcube
 streaming audio server.")
     (home-page "https://musikcube.com/")
     (license license:bsd-3)))
+
+(define-public quodlibet
+  (package
+    (name "quodlibet")
+    (version "4.5.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/quodlibet/quodlibet")
+             (commit (string-append "release-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1i5k93k3bfp7hpcwkbr865mbj9jam3jv2a5k1bazcyp4f5vdrb0v"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build python-build-system)
+                  ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+                  (guix build utils))
+       #:imported-modules (,@%gnu-build-system-modules
+                           (guix build python-build-system)
+                           (guix build glib-or-gtk-build-system))
+       #:tests? #t
+       #:phases
+       (modify-phases %standard-phases
+
+         (add-before 'check 'test-suite-wants-to-home-directory
+           (lambda _
+             (setenv "HOME" (getcwd))
+             #t))
+
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (if tests?
+                 (begin
+                   (invoke "xvfb-run" "pytest"
+                           "--disable-warnings" ; ignored upstream
+                           "--ignore=tests/test_browsers_iradio.py" ; needs network
+                           "--ignore=tests/quality" ; broken upstream
+                           ))
+                 (format #t "test suite not run~%"))))
+
+         (add-after 'install 'glib-or-gtk-wrap ; ensure icons loaded
+           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
+
+         (add-after 'install 'wrap-gi-typelib ; GObject Introspection
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+               (for-each (lambda (prog)
+                           (wrap-program (string-append out "/bin/" prog)
+                             `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
+                         '("exfalso" "quodlibet")))
+             #t)))))
+
+    (native-inputs
+     (list xvfb-run gettext-minimal))
+    (inputs
+     (list adwaita-icon-theme
+           gtk+ ;; propagates gdk-pixbuf+svg
+           glib
+           gsettings-desktop-schemas
+           gst-plugins-bad
+           gst-plugins-base
+           gst-plugins-good
+           gst-plugins-ugly
+           gstreamer
+           gtk+
+           hicolor-icon-theme
+           librsvg
+           libsoup-minimal-2
+           python
+           python-cheetah
+           python-dbus
+           python-feedparser
+           python-gst
+           python-iniconfig
+           python-mutagen
+           python-pycairo
+           python-pygobject
+           python-pytest
+           python-sgmllib3k
+           python-toml))
+    (home-page "https://github.com/quodlibet/quodlibet")
+    (synopsis "Audio library, manager & player")
+    (description "Quod Libet is a cross-platform audio / music management
+program. It provides many ways to view your local library, and supports
+streaming audio and feeds (podcasts etc). It has extremely flexible metadata
+editing and searching capabilities. Ex Falso is a program that uses the same
+tag editing back-end as Quod Libet, but isn’t connected to an audio player.")
+    (license license:gpl2+)))