From e292f21d684d6f5c2d6f0bdbb0fac247acfa70f6 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Tue, 6 Jan 2026 11:58:01 +0100 Subject: [PATCH] gnu: quodlibet: Switch to pyproject. * gnu/packages/music.scm (quodlibet): [build-system]: Switch to pyproject-build-system. [arguments]<#:imported-modules, #:modules, #:phases>: Switch to pyproject-build-system. <#:phases>: Improve phase 'wrap-extra-paths. [native-inputs]: Add python-setuptools. Change-Id: Icb9b41dfc3e16fbf0d98d5a4f01b8cb18b6eca83 Signed-off-by: Sharlatan Hellseher Signed-off-by: Rutherther --- gnu/packages/music.scm | 62 ++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 445dd0bc5d4594302dfe3ff07021df0037cb56ea..b7f07f0abeccedfdcc0712c42ed6df65a0daf8cd 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -7838,41 +7838,43 @@ streaming audio server.") (patches (search-patches "quodlibet-disable-bundled-packages.patch")) (modules '((guix build utils))) (snippet '(delete-file-recursively "quodlibet/packages")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list - #:modules '((guix build python-build-system) + #:imported-modules `(,@%pyproject-build-system-modules + ,@%glib-or-gtk-build-system-modules) + #:modules '((guix build pyproject-build-system) ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) (guix build utils)) - #:imported-modules `((guix build python-build-system) - ,@%glib-or-gtk-build-system-modules) #:phases - #~(modify-phases %standard-phases - (add-before 'check 'pre-check - (lambda _ - (setenv "HOME" (getcwd)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (invoke "xvfb-run" "pytest" - ;; needs network - "--ignore=tests/plugin/test_covers.py" - "--ignore=tests/test_browsers_iradio.py") - (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-extra-paths - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (gi-typelib-path (getenv "GI_TYPELIB_PATH")) - (gst-plugins-path (getenv "GST_PLUGIN_SYSTEM_PATH"))) - (for-each - (lambda (prog) - (wrap-program (string-append out "/bin/" prog) - `("GI_TYPELIB_PATH" ":" = (,gi-typelib-path)) - `("GST_PLUGIN_SYSTEM_PATH" ":" suffix (,gst-plugins-path)))) - '("exfalso" "quodlibet")))))))) - (native-inputs (list xvfb-run gettext-minimal python-pytest)) + (with-extensions (list (pyproject-guile-json)) + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + (setenv "HOME" (getcwd)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "xvfb-run" "pytest" + ;; needs network + "--ignore=tests/plugin/test_covers.py" + "--ignore=tests/test_browsers_iradio.py") + (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-extra-paths + (lambda _ + (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")) + (gst-plugins-path (getenv "GST_PLUGIN_SYSTEM_PATH"))) + (for-each + (lambda (prog) + (wrap-program (string-append #$output "/bin/" prog) + `("GI_TYPELIB_PATH" ":" = (,gi-typelib-path)) + `("GST_PLUGIN_SYSTEM_PATH" ":" suffix + (,gst-plugins-path)))) + '("exfalso" "quodlibet"))))))))) + (native-inputs (list xvfb-run gettext-minimal python-pytest + python-setuptools)) (inputs (list adwaita-icon-theme bash-minimal