diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2022-04-16 09:01:04 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2022-04-19 20:28:01 +0200 |
commit | 6b4d37760e24e16fd32a7c2cc2dab289a7e3deb0 (patch) | |
tree | fee65b52ef7f805cea9723cd64e287b4ec0fd404 /gnu/packages/games.scm | |
parent | 5376f3d058b91469d1f6daa56e4ffcef42ae34e4 (diff) | |
download | guix-6b4d37760e24e16fd32a7c2cc2dab289a7e3deb0.tar.gz |
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.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r-- | gnu/packages/games.scm | 47 |
1 files 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 |