gnu: luanti: Prefix search paths with LUANTI.

* gnu/packages/patches/luanti-paths.patch: New file.
* gnu/packages/luanti.scm (luanti)[source]: Use it.
[#:phases]<check>: Use LUANTI_GAME_PATH.
[native-search-paths]: Rename “MINETEST_GAME_PATH” to “LUANTI_GAME_PATH”.
Rename “MINETEST_MOD_PATH” to “LUANTI_MOD_PATH”.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* guix/build/luanti-build-system.scm (check): Use LUANTI_MOD_PATH.
This commit is contained in:
Liliana Marie Prikler 2025-06-29 15:58:35 +02:00
parent abbdfbb775
commit 9a75c8ac13
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87
4 changed files with 84 additions and 6 deletions

View file

@ -158,12 +158,12 @@ error. If NOT-FOUND is TRUE, call NOT-FOUND instead."
(when tests?
(mkdir "guix_testworld")
;; Add the mod to the mod search path, such that Luanti can find it.
(setenv "MINETEST_MOD_PATH"
(setenv "LUANTI_MOD_PATH"
(list->search-path-as-string
(cons
(string-append (assoc-ref outputs "out") "/share/luanti/mods")
(search-path-as-string->list
(or (getenv "MINETEST_MOD_PATH") "")))
(or (getenv "LUANTI_MOD_PATH") "")))
":"))
(with-directory-excursion "guix_testworld"
(setenv "HOME" (getcwd))
@ -181,7 +181,7 @@ auth_backend = sqlite3
(lambda (mod)
(format port "load_mod_~a = true~%" mod))
(all-mod-names (search-path-as-string->list
(getenv "MINETEST_MOD_PATH"))))))
(getenv "LUANTI_MOD_PATH"))))))
(receive (port pid)
((@@ (guix build utils) open-pipe-with-stderr)
"xvfb-run" "--" "luanti" "--info" "--world" "." "--go")