[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/09: gnu: openttd: Use new package style.
From: |
guix-commits |
Subject: |
08/09: gnu: openttd: Use new package style. |
Date: |
Tue, 19 Apr 2022 14:37:40 -0400 (EDT) |
lilyp pushed a commit to branch master
in repository guix.
commit 6b4d37760e24e16fd32a7c2cc2dab289a7e3deb0
Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
AuthorDate: Sat Apr 16 09:01:04 2022 +0200
gnu: openttd: Use new package style.
* gnu/packages/games.scm (openttd)[arguments]: Convert to list of
G-Expressions.
<install-data>: Use search paths to find ‘/share/games/openttd’ input
directories.
[native-inputs]: Use modify-inputs.
---
gnu/packages/games.scm | 47 ++++++++++++++++++++++++-----------------------
1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5cb79375e0..ff2b3199e0 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4447,35 +4447,36 @@ Transport Tycoon Deluxe.")
(inherit openttd-engine)
(name "openttd")
(arguments
- `(#:configure-flags
- (let* ((out (assoc-ref %outputs "out")))
- (list (string-append "-DCMAKE_INSTALL_BINDIR=" out "/bin")))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-sources
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/music/fluidsynth.cpp"
- (("default_sf\\[\\] = \\{" all)
- (string-append all "
+ (list
+ #:configure-flags
+ #~(list (string-append "-DCMAKE_INSTALL_BINDIR=" #$output "/bin"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-sources
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/music/fluidsynth.cpp"
+ (("default_sf\\[\\] = \\{" all)
+ (string-append all "
\t/* Guix hardcoded :P */
-\t\"" (string-append (assoc-ref inputs "freepats-gm")
- "/share/soundfonts/FreePatsGM.sf2") "\",
+\t\"" (search-input-file inputs "/share/soundfonts/FreePatsGM.sf2") "\",
")))))
- (add-before 'check 'install-data
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (for-each
- (lambda (input)
- (copy-recursively (assoc-ref inputs input)
- (assoc-ref outputs "out")))
- (list "opengfx" "openmsx" "opensfx")))))))
+ (add-before 'check 'install-data
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((base "/share/games/openttd"))
+ (for-each
+ (lambda (dir)
+ ;; Copy the entire input, so as to not omit documentation
+ ;; etc.
+ (copy-recursively
+ (string-drop-right dir (string-length base))
+ (assoc-ref outputs "out")))
+ (search-path-as-list (list base) (map cdr inputs)))))))))
(inputs
(modify-inputs (package-inputs openttd-engine)
(prepend fluidsynth freepats-gm)))
(native-inputs
- `(("opengfx" ,openttd-opengfx)
- ("openmsx" ,openttd-openmsx)
- ("opensfx" ,openttd-opensfx)
- ,@(package-native-inputs openttd-engine)))))
+ (modify-inputs (package-native-inputs openttd-engine)
+ (prepend openttd-opengfx openttd-openmsx openttd-opensfx)))))
(define openrct2-title-sequences
(package
- branch master updated (cd23250c16 -> 0b681c5896), guix-commits, 2022/04/19
- 04/09: gnu: openttd-engine: Drop labels from inputs., guix-commits, 2022/04/19
- 07/09: gnu: openttd-openmsx: Use new package style., guix-commits, 2022/04/19
- 03/09: gnu: openttd: Let the music play., guix-commits, 2022/04/19
- 01/09: gnu: gnome-shell-extension-just-perfection: Update to 20.0., guix-commits, 2022/04/19
- 02/09: gnu: Add freepats-gm., guix-commits, 2022/04/19
- 06/09: gnu: openttd-opensfx: Use new package style., guix-commits, 2022/04/19
- 09/09: gnu: komikku: Update to 0.38.0., guix-commits, 2022/04/19
- 05/09: gnu: openttd-gfx: Use new package style., guix-commits, 2022/04/19
- 08/09: gnu: openttd: Use new package style.,
guix-commits <=