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'.
This commit is contained in:
parent
3a261950ac
commit
2dad4c910a
1 changed files with 28 additions and 33 deletions
|
@ -5225,54 +5225,49 @@ Github or Gitlab.")
|
||||||
(define-public colobot
|
(define-public colobot
|
||||||
(package
|
(package
|
||||||
(name "colobot")
|
(name "colobot")
|
||||||
(version "0.1.11.1-alpha")
|
(version "0.1.12-alpha")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method git-fetch)
|
||||||
(uri (string-append "https://github.com/colobot/colobot/archive/"
|
(uri (git-reference
|
||||||
"colobot-gold-" version ".tar.gz"))
|
(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
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0h6f4icarramhjkxxbzz6siv3v11z5r8ghqisgr1rscw217vhmwf"))))
|
"1c181cclkrnspgs07lvndg2c81cjq3smkv7qim8c470cj88rcrp2"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ;no test
|
`(#:tests? #f ;no test
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'unpack-data
|
(add-after 'unpack 'make-git-checkout-writable
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda _
|
||||||
(let ((data (assoc-ref inputs "colobot-data")))
|
(for-each make-file-writable (find-files "."))
|
||||||
(invoke "tar" "-xvf" data "-Cdata" "--strip-components=1")
|
#t))
|
||||||
#t)))
|
(add-after 'unpack 'fix-directories
|
||||||
(add-after 'unpack-data 'install-music
|
(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)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; Installation process tries to download music files using
|
;; Installation process tries to download music files using
|
||||||
;; "wget" if not already present. Since we are going to install
|
;; "wget" if not already present. Since we are going another
|
||||||
;; them, skip "wget" command check.
|
;; route, skip "wget" command check.
|
||||||
(substitute* "data/music/CMakeLists.txt"
|
(substitute* "data/music/CMakeLists.txt"
|
||||||
(("find_program\\(WGET wget\\)") ""))
|
(("find_program\\(WGET wget\\)") ""))
|
||||||
;; Effectively install music.
|
;; Populate "music/" directory.
|
||||||
(let ((data (assoc-ref inputs "colobot-music")))
|
(let ((data (assoc-ref inputs "colobot-music")))
|
||||||
(invoke "tar" "-xvf" data "-Cdata/music")
|
(invoke "tar" "-xvf" data "-Cdata/music"))
|
||||||
#t)))
|
#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))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("colobot-data"
|
`(("colobot-music"
|
||||||
,(origin
|
|
||||||
(method url-fetch)
|
|
||||||
(uri (string-append
|
|
||||||
"https://github.com/colobot/colobot-data/archive/"
|
|
||||||
"colobot-gold-" version ".tar.gz"))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"0riznycx2jbxmg4m9nn3mcpqws2c0s7cn2m9skz9zj1w39r5qpjy"))))
|
|
||||||
("colobot-music"
|
|
||||||
,(origin
|
,(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://colobot.info/files/music/"
|
(uri (string-append "https://colobot.info/files/music/"
|
||||||
|
|
Reference in a new issue