From 3b19d7f548e6ba53a45167a28ef19fd43e398396 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Thu, 9 Oct 2025 14:14:32 +0100 Subject: [PATCH] gnu: frescobaldi: Generate and wrap icons. It is a following up 44db09e0d132b02c3ae10895406a6b7d3ece42df commit where translation and metadata generation were removed while upstream change the build logic; fixed wrap phase was re-introduced as well. * gnu/packages/music.scm (frescobaldi)[arguments] : Add 'generate and 'wrap-executable. [inputs]: Add qtbase, qtsvg, and qtwayland. [native-inputs]: Add appstream, desktop-file-utils, and gettext-minimal. Change-Id: I47ba790145eeb4d8346190a5902e42b2ea06000e --- gnu/packages/music.scm | 55 +++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 2e3477673168ee72afaa3202e9eed20c2176d53f..ff9df16ab32651ab94444be0469c3ab4243ec048 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -3262,18 +3262,51 @@ MIDI files, based on libsmf.") (build-system pyproject-build-system) (arguments (list - #:tests? #f)) ;no tests included + #:tests? #f ;no tests included + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'generate-xdg-files + ;; Steps are taken from .github/workflows/release.yml. + (lambda _ + (invoke "python" "i18n/mo-gen.py") + (invoke "msgfmt" "--desktop" + "-d" "i18n/frescobaldi" + "--template" "linux/org.frescobaldi.Frescobaldi.desktop.in" + "-o" "linux/org.frescobaldi.Frescobaldi.desktop") + (invoke "msgfmt" "--xml" + "-d" "i18n/frescobaldi" + "--template" "linux/org.frescobaldi.Frescobaldi.metainfo.xml.in" + "-o" "linux/org.frescobaldi.Frescobaldi.metainfo.xml"))) + (add-after 'wrap 'wrap-executable + (lambda _ + ;; Ensure that icons are found at runtime. + (wrap-program (string-append #$output "/bin/frescobaldi") + `("QT_PLUGIN_PATH" prefix + ,(list (string-append + (string-join + (list #$(this-package-input "qtbase") + #$(this-package-input "qtsvg") + #$(this-package-input "qtwayland")) + "/lib/qt6/plugins:") + "/lib/qt6/plugins"))))))))) (native-inputs - (list python-hatchling)) - (inputs (list bash-minimal - lilypond - poppler - portmidi-2 - python-ly - python-pyqt-6 - python-pyqt6-sip - python-pyqtwebengine-6 - qpageview)) + (list appstream ;for appstreamctl + desktop-file-utils ;for desktop-file-validate + gettext-minimal ;for msgfmt + python-hatchling)) + (inputs + (list bash-minimal + lilypond + poppler + portmidi-2 + python-ly + python-pyqt-6 + python-pyqt6-sip + python-pyqtwebengine-6 + qpageview + qtbase + qtsvg + qtwayland)) (home-page "https://www.frescobaldi.org/") (synopsis "LilyPond sheet music text editor") (description