gnu: minetest: Use new style.
* gnu/packages/minetest.scm (minetest)[arguments]: Convert to list of G-Expressions. Use search-input-file and search-input-directory where appropriate. Drop trailing #t. [inputs]: Drop labels.
This commit is contained in:
parent
e584e58e92
commit
a5afbbe2d6
1 changed files with 62 additions and 60 deletions
|
@ -6,7 +6,7 @@
|
||||||
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
|
||||||
;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2021 Trevor Hass <thass@okstate.edu>
|
;;; Copyright © 2021 Trevor Hass <thass@okstate.edu>
|
||||||
;;; Copyright © 2020, 2021 Liliana Marie Prikler <liliana.prikler@gmail.com>
|
;;; Copyright © 2020, 2021, 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
|
||||||
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -42,6 +42,7 @@
|
||||||
#:use-module (gnu packages xiph)
|
#:use-module (gnu packages xiph)
|
||||||
#:use-module (gnu packages xorg)
|
#:use-module (gnu packages xorg)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix build-system cmake)
|
#:use-module (guix build-system cmake)
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
|
@ -70,31 +71,33 @@
|
||||||
#t))))
|
#t))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
(list
|
||||||
(list "-DRUN_IN_PLACE=0"
|
#:configure-flags
|
||||||
|
#~(list "-DRUN_IN_PLACE=0"
|
||||||
"-DENABLE_FREETYPE=1"
|
"-DENABLE_FREETYPE=1"
|
||||||
"-DENABLE_GETTEXT=1"
|
"-DENABLE_GETTEXT=1"
|
||||||
"-DENABLE_SYSTEM_JSONCPP=TRUE"
|
"-DENABLE_SYSTEM_JSONCPP=TRUE"
|
||||||
(string-append "-DIRRLICHTMT_INCLUDE_DIR="
|
(string-append "-DIRRLICHTMT_INCLUDE_DIR="
|
||||||
(assoc-ref %build-inputs "irrlicht-for-minetest")
|
(search-input-directory %build-inputs
|
||||||
"/include/irrlicht")
|
"include/irrlichtmt"))
|
||||||
(string-append "-DCURL_INCLUDE_DIR="
|
(string-append "-DCURL_INCLUDE_DIR="
|
||||||
(assoc-ref %build-inputs "curl")
|
(search-input-directory %build-inputs
|
||||||
"/include/curl")
|
"include/curl"))
|
||||||
(string-append "-DZSTD_INCLUDE_DIR="
|
(string-append "-DZSTD_INCLUDE_DIR="
|
||||||
(assoc-ref %build-inputs "zstd")
|
(dirname
|
||||||
"/include/zstd")
|
(search-input-file %build-inputs
|
||||||
|
"include/zstd.h")))
|
||||||
(string-append "-DZSTD_LIBRARY="
|
(string-append "-DZSTD_LIBRARY="
|
||||||
(assoc-ref %build-inputs "zstd")
|
(search-input-file %build-inputs
|
||||||
"/lib/libzstd.so"))
|
"lib/libzstd.so")))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'patch-sources
|
(add-after 'unpack 'patch-sources
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(substitute* "src/filesys.cpp"
|
(substitute* "src/filesys.cpp"
|
||||||
;; Use store-path for "rm" instead of non-existing FHS path.
|
;; Use store-path for "rm" instead of non-existing FHS path.
|
||||||
(("\"/bin/rm\"")
|
(("\"/bin/rm\"")
|
||||||
(string-append "\"" (assoc-ref inputs "coreutils") "/bin/rm\"")))
|
(format #f "~s" (search-input-file inputs "bin/rm"))))
|
||||||
(substitute* "src/CMakeLists.txt"
|
(substitute* "src/CMakeLists.txt"
|
||||||
;; Let minetest binary remain in build directory.
|
;; Let minetest binary remain in build directory.
|
||||||
(("set\\(EXECUTABLE_OUTPUT_PATH .*\\)") ""))
|
(("set\\(EXECUTABLE_OUTPUT_PATH .*\\)") ""))
|
||||||
|
@ -102,9 +105,8 @@
|
||||||
;; do no override MINETEST_SUBGAME_PATH
|
;; do no override MINETEST_SUBGAME_PATH
|
||||||
(("(un)?setenv\\(\"MINETEST_SUBGAME_PATH\".*\\);")
|
(("(un)?setenv\\(\"MINETEST_SUBGAME_PATH\".*\\);")
|
||||||
"(void)0;"))
|
"(void)0;"))
|
||||||
(setenv "MINETEST_SUBGAME_PATH"
|
(setenv "MINETEST_SUBGAME_PATH" ; for check
|
||||||
(string-append (getcwd) "/games")) ; for check
|
(string-append (getcwd) "/games"))))
|
||||||
#t))
|
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
;; Thanks to our substitutions, the tests should also run
|
;; Thanks to our substitutions, the tests should also run
|
||||||
|
@ -122,24 +124,24 @@
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list pkg-config))
|
(list pkg-config))
|
||||||
(inputs
|
(inputs
|
||||||
`(("coreutils" ,coreutils)
|
(list coreutils
|
||||||
("curl" ,curl)
|
curl
|
||||||
("freetype" ,freetype)
|
freetype
|
||||||
("gettext" ,gettext-minimal)
|
gettext-minimal
|
||||||
("gmp" ,gmp)
|
gmp
|
||||||
("irrlicht-for-minetest" ,irrlicht-for-minetest)
|
irrlicht-for-minetest
|
||||||
("jsoncpp" ,jsoncpp)
|
jsoncpp
|
||||||
("libjpeg" ,libjpeg-turbo)
|
libjpeg-turbo
|
||||||
("libpng" ,libpng)
|
libpng
|
||||||
("libogg" ,libogg)
|
libogg
|
||||||
("libvorbis" ,libvorbis)
|
libvorbis
|
||||||
("libxxf86vm" ,libxxf86vm)
|
libxxf86vm
|
||||||
("luajit" ,luajit)
|
luajit
|
||||||
("mesa" ,mesa)
|
mesa
|
||||||
("ncurses" ,ncurses)
|
ncurses
|
||||||
("openal" ,openal)
|
openal
|
||||||
("sqlite" ,sqlite)
|
sqlite
|
||||||
("zstd" ,zstd "lib")))
|
`(,zstd "lib")))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list minetest-data))
|
(list minetest-data))
|
||||||
(synopsis "Infinite-world block sandbox game")
|
(synopsis "Infinite-world block sandbox game")
|
||||||
|
|
Reference in a new issue