diff options
| author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-10-14 14:06:47 +0200 |
|---|---|---|
| committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-10-23 01:12:19 +0200 |
| commit | 85f934ccffbdc63f60633f1768fceb275a4e8252 (patch) | |
| tree | 65152b3fa8e72a7e13fddfffb366441fc7cef58e | |
| parent | b24ec4268612f1caf8062f28d3ce8bb554dbbae2 (diff) | |
gnu: colobot: Improve package style.
* gnu/packages/games.scm (colobot)[arguments]: Use G-expressions.
<#:phases>: Remove trailing #T.
[native-inputs, inputs]: Remove labels.
| -rw-r--r-- | gnu/packages/games.scm | 103 |
1 files changed, 55 insertions, 48 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 72a6ccfd59c..2387ad3fc61 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm | |||
| @@ -7768,56 +7768,63 @@ Github or Gitlab.") | |||
| 7768 | (base32 "0bpy5nzkvq5nfr0w8jf7bl7zs8yz2cpzp87pnkdlgwl3adcn9nsw")))) | 7768 | (base32 "0bpy5nzkvq5nfr0w8jf7bl7zs8yz2cpzp87pnkdlgwl3adcn9nsw")))) |
| 7769 | (build-system cmake-build-system) | 7769 | (build-system cmake-build-system) |
| 7770 | (arguments | 7770 | (arguments |
| 7771 | `(#:tests? #f ;no test | 7771 | (list |
| 7772 | #:phases | 7772 | #:tests? #f ;no test |
| 7773 | (modify-phases %standard-phases | 7773 | #:modules '((guix build cmake-build-system) |
| 7774 | (add-after 'unpack 'make-git-checkout-writable | 7774 | (guix build utils) |
| 7775 | (lambda _ | 7775 | (srfi srfi-1) |
| 7776 | (for-each make-file-writable (find-files ".")) | 7776 | (ice-9 match) |
| 7777 | #t)) | 7777 | (ice-9 regex)) |
| 7778 | (add-after 'unpack 'fix-directories | 7778 | #:phases |
| 7779 | (lambda _ | 7779 | #~(modify-phases %standard-phases |
| 7780 | (substitute* "CMakeLists.txt" | 7780 | (add-after 'unpack 'make-git-checkout-writable |
| 7781 | (("(\\$\\{CMAKE_INSTALL_PREFIX\\})/games" _ prefix) | 7781 | (lambda _ |
| 7782 | (string-append prefix "/bin")) | 7782 | (for-each make-file-writable (find-files ".")))) |
| 7783 | (("(\\$\\{CMAKE_INSTALL_PREFIX\\}/share)/games/colobot" _ prefix) | 7783 | (add-after 'unpack 'fix-directories |
| 7784 | (string-append prefix "/colobot"))) | 7784 | (lambda _ |
| 7785 | #t)) | 7785 | (substitute* "CMakeLists.txt" |
| 7786 | (add-after 'fix-directories 'install-music | 7786 | (("(\\$\\{CMAKE_INSTALL_PREFIX\\})/games" _ prefix) |
| 7787 | ;; Retrieve and install music files. | 7787 | (string-append prefix "/bin")) |
| 7788 | (lambda* (#:key inputs #:allow-other-keys) | 7788 | (("(\\$\\{CMAKE_INSTALL_PREFIX\\}/share)/games/colobot" _ prefix) |
| 7789 | ;; Installation process tries to download music files using | 7789 | (string-append prefix "/colobot"))))) |
| 7790 | ;; "wget" if not already present. Since we are going another | 7790 | (add-after 'fix-directories 'install-music |
| 7791 | ;; route, skip "wget" command check. | 7791 | ;; Retrieve and install music files. |
| 7792 | (substitute* "data/music/CMakeLists.txt" | 7792 | (lambda* (#:key inputs #:allow-other-keys) |
| 7793 | (("find_program\\(WGET wget\\)") "")) | 7793 | ;; Installation process tries to download music files using |
| 7794 | ;; Populate "music/" directory. | 7794 | ;; "wget" if not already present. Since we are going another |
| 7795 | (let ((data (assoc-ref inputs "colobot-music"))) | 7795 | ;; route, skip "wget" command check. |
| 7796 | (invoke "tar" "-xvf" data "-Cdata/music")) | 7796 | (substitute* "data/music/CMakeLists.txt" |
| 7797 | #t))))) | 7797 | (("find_program\\(WGET wget\\)") "")) |
| 7798 | ;; Populate "music/" directory. | ||
| 7799 | (let ((data | ||
| 7800 | (any | ||
| 7801 | (match-lambda ((_ . input) | ||
| 7802 | (and (string-match "colobot-music" input) | ||
| 7803 | input))) | ||
| 7804 | inputs))) | ||
| 7805 | (invoke "tar" "-xvf" data "-Cdata/music"))))))) | ||
| 7798 | (native-inputs | 7806 | (native-inputs |
| 7799 | `(("colobot-music" | 7807 | (list (origin |
| 7800 | ,(origin | 7808 | (method url-fetch) |
| 7801 | (method url-fetch) | 7809 | (uri (string-append "https://colobot.info/files/music/" |
| 7802 | (uri (string-append "https://colobot.info/files/music/" | 7810 | "colobot-music_ogg_" version ".tar.gz")) |
| 7803 | "colobot-music_ogg_" version ".tar.gz")) | 7811 | (sha256 |
| 7804 | (sha256 | 7812 | (base32 |
| 7805 | (base32 | 7813 | "1s86cd36rwkff329mb1ay1wi5qqyi35564ppgr3f4qqz9wj9vs2m"))) |
| 7806 | "1s86cd36rwkff329mb1ay1wi5qqyi35564ppgr3f4qqz9wj9vs2m")))) | 7814 | gettext-minimal |
| 7807 | ("gettext" ,gettext-minimal) | 7815 | (librsvg-for-system) |
| 7808 | ("librsvg" ,(librsvg-for-system)) | 7816 | po4a |
| 7809 | ("po4a" ,po4a) | 7817 | python-wrapper)) |
| 7810 | ("python" ,python-wrapper))) | ||
| 7811 | (inputs | 7818 | (inputs |
| 7812 | `(("boost" ,boost) | 7819 | (list boost |
| 7813 | ("glew" ,glew) | 7820 | glew |
| 7814 | ("libogg" ,libogg) | 7821 | libogg |
| 7815 | ("libpng" ,libpng) | 7822 | libpng |
| 7816 | ("libsndfile" ,libsndfile) | 7823 | libsndfile |
| 7817 | ("libvorbis" ,libvorbis) | 7824 | libvorbis |
| 7818 | ("openal" ,openal) | 7825 | openal |
| 7819 | ("physfs" ,physfs) | 7826 | physfs |
| 7820 | ("sdl" ,(sdl-union (list sdl2 sdl2-image sdl2-ttf))))) | 7827 | (sdl-union (list sdl2 sdl2-image sdl2-ttf)))) |
| 7821 | (synopsis "Educational programming strategy game") | 7828 | (synopsis "Educational programming strategy game") |
| 7822 | (description "Colobot: Gold Edition is a real-time strategy game, where | 7829 | (description "Colobot: Gold Edition is a real-time strategy game, where |
| 7823 | you can program your units (bots) in a language called CBOT, which is similar | 7830 | you can program your units (bots) in a language called CBOT, which is similar |
