1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

gnu: luanti: Add “devtest” output.

* gnu/packages/luanti.scm (luanti)
[#:configure-flags]: Add “-DINSTALL_DEVTEST=TRUE”.
[#:phases]<check>: Use installed devtest for LUANTI_GAME_PATH.
<move-devtest>: New phase.
[outputs]: Add “devtest”.
[properties]: Add output synopsis for “devtest”.

Change-Id: If4e4bb938d602f9e668f776dd6d4dfbdda90f9b7
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Jan Wielkiewicz
2026-03-14 19:56:37 +01:00
committed by Liliana Marie Prikler
parent 3432415d91
commit 741fcc76e7

View File

@@ -101,7 +101,8 @@
#:configure-flags #:configure-flags
#~(list "-DBUILD_DOCUMENTATION=OFF" ;not installed anyway #~(list "-DBUILD_DOCUMENTATION=OFF" ;not installed anyway
"-DENABLE_LTO=ON" "-DENABLE_LTO=ON"
"-DENABLE_UPDATE_CHECKER=FALSE") "-DENABLE_UPDATE_CHECKER=FALSE"
"-DINSTALL_DEVTEST=TRUE")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(delete 'check) (delete 'check)
@@ -112,9 +113,15 @@
(when tests? (when tests?
(setenv "HOME" "/tmp") (setenv "HOME" "/tmp")
(setenv "LUANTI_GAME_PATH" (setenv "LUANTI_GAME_PATH"
(string-append (getcwd) "/../source/games")) (string-append #$output "/share/luanti/games"))
(invoke "../source/bin/luanti" "--run-unittests") (invoke "../source/bin/luanti" "--run-unittests")
(invoke "../source/util/test_multiplayer.sh"))))))) (invoke "../source/util/test_multiplayer.sh"))))
(add-after 'check 'move-devtest
(lambda _
(let ((source (string-append #$output "/share/luanti/games/devtest"))
(target (string-append #$output:devtest "/share/luanti/games/devtest")))
(mkdir-p (dirname target))
(rename-file source target)))))))
(native-search-paths (native-search-paths
(list (search-path-specification (list (search-path-specification
(variable "LUANTI_GAME_PATH") (variable "LUANTI_GAME_PATH")
@@ -140,7 +147,7 @@
sdl2 sdl2
sqlite sqlite
`(,zstd "lib"))) `(,zstd "lib")))
(outputs '("out" "debug")) (outputs '("out" "debug" "devtest"))
(synopsis "Voxel game engine") (synopsis "Voxel game engine")
(description (description
"Luanti is a voxel game engine that supports modding and game creation "Luanti is a voxel game engine that supports modding and game creation
@@ -150,7 +157,8 @@ platform, users need to install games themselves (for example,
@code{luanti-minetest-game}), either through Guix, the built-in interface or other @code{luanti-minetest-game}), either through Guix, the built-in interface or other
sources.") sources.")
(home-page "https://www.luanti.org/") (home-page "https://www.luanti.org/")
(license license:lgpl2.1+))) (license license:lgpl2.1+)
(properties `((output-synopsis "devtest" "Developer test game")))))
(define-public luanti-server (define-public luanti-server
(package (package