aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2022-12-14 18:44:04 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2022-12-14 21:14:28 +0100
commitef7ad7d451433d4f1505d265b623a1903525f03c (patch)
tree3bee317a17dc51d13c959ebfd73e7837fe1a1d41
parentb36375630602f8bf972e4576b2b5d4f93949f0f1 (diff)
downloadguix-ef7ad7d451433d4f1505d265b623a1903525f03c.tar.gz
guix-ef7ad7d451433d4f1505d265b623a1903525f03c.zip
gnu: rosegarden: Improve package style.
* gnu/packages/music.scm (rosegarden)[arguments]: Use G-expressions and SEARCH-INPUT-FILE. [inputs]: Use BASH-MINIMAL instead of BASH.
-rw-r--r--gnu/packages/music.scm103
1 files changed, 52 insertions, 51 deletions
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index bf502e0e80..614eb57791 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -5019,58 +5019,59 @@ specification and header.")
(base32 "061xy3flmj7bllibkp5wzdycvghfxvyzdr9g9yrr5q3m70a7wznz"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags '("-DCMAKE_BUILD_TYPE=Release")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-tests
- (lambda _
- (substitute* "CMakeLists.txt"
- (("BUILD_TESTING OFF") "BUILD_TESTING ON")
- ;; Make tests work.
- ((" -fvisibility=hidden") ""))))
- (add-after 'unpack 'fix-references
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/gui/general/ProjectPackager.cpp"
- (("\"flac\\>")
- (string-append "\"" (assoc-ref inputs "flac") "/bin/flac"))
- (("\"wavpack\\>")
- (string-append "\"" (assoc-ref inputs "wavpack") "/bin/wavpack"))
- (("\"wvunpack\\>")
- (string-append "\"" (assoc-ref inputs "wavpack") "/bin/wvunpack"))
- (("\"bash\\>")
- (string-append "\"" (assoc-ref inputs "bash") "/bin/bash"))
- (("\"tar\\>")
- (string-append "\"" (assoc-ref inputs "tar") "/bin/tar")))
- (substitute* "src/gui/general/LilyPondProcessor.cpp"
- (("\"convert-ly\\>")
- (string-append "\"" (assoc-ref inputs "lilypond") "/bin/convert-ly"))
- (("\"lilypond\\>")
- (string-append "\"" (assoc-ref inputs "lilypond") "/bin/lilypond")))))
- (add-after 'unpack 'make-reproducible
- (lambda _
- ;; Prevent Last-Modified from being written.
- ;; The "*.qm" files that are used in locale.qrc would have a new
- ;; mtime otherwise that is written into qrc_locale.cpp in the
- ;; end - except when we disable it.
- (substitute* "src/CMakeLists.txt"
- (("COMMAND [$][{]QT_RCC_EXECUTABLE[}]")
- "COMMAND ${QT_RCC_EXECUTABLE} --format-version 1")
- ;; Extraneous.
- ;;(("qt5_add_resources[(]rg_SOURCES ../data/data.qrc[)]")
- ;; "qt5_add_resources(rg_SOURCES ../data/data.qrc OPTIONS --format-version 1)")
- )
- ;; Make hashtable traversal order predicable.
- (setenv "QT_RCC_TEST" "1"))) ; important
- (add-before 'check 'prepare-check
- (lambda _
- (setenv "QT_QPA_PLATFORM" "offscreen")
- ;; Tests create files in $HOME/.local/share/rosegarden .
- (mkdir-p "/tmp/foo")
- (setenv "HOME" "/tmp/foo")
- (setenv "XDG_RUNTIME_DIR" "/tmp/foo"))))))
+ (list
+ #:configure-flags #~(list "-DCMAKE_BUILD_TYPE=Release")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-tests
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("BUILD_TESTING OFF") "BUILD_TESTING ON")
+ ;; Make tests work.
+ ((" -fvisibility=hidden") ""))))
+ (add-after 'unpack 'fix-references
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/gui/general/ProjectPackager.cpp"
+ (("\"flac\\>")
+ (string-append "\"" (search-input-file inputs "/bin/flac")))
+ (("\"wavpack\\>")
+ (string-append "\"" (search-input-file inputs "/bin/wavpack")))
+ (("\"wvunpack\\>")
+ (string-append "\"" (search-input-file inputs "/bin/wvunpack")))
+ (("\"bash\\>")
+ (string-append "\"" (search-input-file inputs "/bin/bash")))
+ (("\"tar\\>")
+ (string-append "\"" (search-input-file inputs "/bin/tar"))))
+ (substitute* "src/gui/general/LilyPondProcessor.cpp"
+ (("\"convert-ly\\>")
+ (string-append "\"" (search-input-file inputs "/bin/convert-ly")))
+ (("\"lilypond\\>")
+ (string-append "\"" (search-input-file inputs "/bin/lilypond"))))))
+ (add-after 'unpack 'make-reproducible
+ (lambda _
+ ;; Prevent Last-Modified from being written.
+ ;; The "*.qm" files that are used in locale.qrc would have a new
+ ;; mtime otherwise that is written into qrc_locale.cpp in the
+ ;; end - except when we disable it.
+ (substitute* "src/CMakeLists.txt"
+ (("COMMAND [$][{]QT_RCC_EXECUTABLE[}]")
+ "COMMAND ${QT_RCC_EXECUTABLE} --format-version 1")
+ ;; Extraneous.
+ ;;(("qt5_add_resources[(]rg_SOURCES ../data/data.qrc[)]")
+ ;; "qt5_add_resources(rg_SOURCES ../data/data.qrc OPTIONS --format-version 1)")
+ )
+ ;; Make hashtable traversal order predicable.
+ (setenv "QT_RCC_TEST" "1"))) ; important
+ (add-before 'check 'prepare-check
+ (lambda _
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ ;; Tests create files in $HOME/.local/share/rosegarden .
+ (mkdir-p "/tmp/foo")
+ (setenv "HOME" "/tmp/foo")
+ (setenv "XDG_RUNTIME_DIR" "/tmp/foo"))))))
(inputs
(list alsa-lib
- bash
+ bash-minimal
dssi
flac
fftwf
@@ -5087,7 +5088,7 @@ specification and header.")
wavpack
zlib))
(native-inputs
- (list pkg-config qttools-5)) ;for qtlinguist
+ (list pkg-config qttools-5)) ;for qtlinguist
(synopsis "Music composition and editing environment based around a MIDI
sequencer")
(description "Rosegarden is a music composition and editing environment