diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-02-27 00:21:58 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-02-27 00:21:58 +0100 |
commit | 2dad4c910ab9b0ca1cb86592e101b5c6d50ce3f1 (patch) | |
tree | c71ecf9b5b452ff109e99990b15eca654ca826f9 | |
parent | 3a261950acd3f6d156eb34b833e5b63116917990 (diff) | |
download | guix-patches-2dad4c910ab9b0ca1cb86592e101b5c6d50ce3f1.tar guix-patches-2dad4c910ab9b0ca1cb86592e101b5c6d50ce3f1.tar.gz |
gnu: colobot: Update to 0.1.12-alpha.
* gnu/packages/games.scm (colobot): Update to 0.1.12-alpha.
[source]: Do not use unstable tarball.
[native-inputs]: Remove "colobot-data", now fetched with recursive
`git-fetch'.
-rw-r--r-- | gnu/packages/games.scm | 61 |
1 files changed, 28 insertions, 33 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index ac53979af4..9976216aaa 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -5225,54 +5225,49 @@ Github or Gitlab.") (define-public colobot (package (name "colobot") - (version "0.1.11.1-alpha") + (version "0.1.12-alpha") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/colobot/colobot/archive/" - "colobot-gold-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/colobot/colobot.git") + (commit (string-append "colobot-gold-" version)) + (recursive? #t))) ;for "data/" subdir + (file-name (git-file-name name version)) (sha256 (base32 - "0h6f4icarramhjkxxbzz6siv3v11z5r8ghqisgr1rscw217vhmwf")))) + "1c181cclkrnspgs07lvndg2c81cjq3smkv7qim8c470cj88rcrp2")))) (build-system cmake-build-system) (arguments `(#:tests? #f ;no test #:phases (modify-phases %standard-phases - (add-after 'unpack 'unpack-data - (lambda* (#:key inputs #:allow-other-keys) - (let ((data (assoc-ref inputs "colobot-data"))) - (invoke "tar" "-xvf" data "-Cdata" "--strip-components=1") - #t))) - (add-after 'unpack-data 'install-music + (add-after 'unpack 'make-git-checkout-writable + (lambda _ + (for-each make-file-writable (find-files ".")) + #t)) + (add-after 'unpack 'fix-directories + (lambda _ + (substitute* "CMakeLists.txt" + (("(\\$\\{CMAKE_INSTALL_PREFIX\\})/games" _ prefix) + (string-append prefix "/bin")) + (("(\\$\\{CMAKE_INSTALL_PREFIX\\}/share)/games/colobot" _ prefix) + (string-append prefix "/colobot"))) + #t)) + (add-after 'fix-directories 'install-music + ;; Retrieve and install music files. (lambda* (#:key inputs #:allow-other-keys) ;; Installation process tries to download music files using - ;; "wget" if not already present. Since we are going to install - ;; them, skip "wget" command check. + ;; "wget" if not already present. Since we are going another + ;; route, skip "wget" command check. (substitute* "data/music/CMakeLists.txt" (("find_program\\(WGET wget\\)") "")) - ;; Effectively install music. + ;; Populate "music/" directory. (let ((data (assoc-ref inputs "colobot-music"))) - (invoke "tar" "-xvf" data "-Cdata/music") - #t))) - (add-after 'install 'fix-install-directory - ;; Move binary from "games/" to "bin/". - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (rename-file (string-append out "/games") - (string-append out "/bin")) - #t)))))) + (invoke "tar" "-xvf" data "-Cdata/music")) + #t))))) (native-inputs - `(("colobot-data" - ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/colobot/colobot-data/archive/" - "colobot-gold-" version ".tar.gz")) - (sha256 - (base32 - "0riznycx2jbxmg4m9nn3mcpqws2c0s7cn2m9skz9zj1w39r5qpjy")))) - ("colobot-music" + `(("colobot-music" ,(origin (method url-fetch) (uri (string-append "https://colobot.info/files/music/" |