guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The problem of packaging Minetest mods/games


From: Leo Prikler
Subject: The problem of packaging Minetest mods/games
Date: Wed, 20 May 2020 00:36:44 +0200
User-agent: Evolution 3.34.2

Hello Jan,

> And this package is in the propagated-inputs fiend of the minetest
> package, but it doesn't work.
> 
> I would like to understand why it doesn't work, fix it and learn
> something new about Guix by the way :)
My guess is, that minetest searches in 
  /gnu/store/<hash>-minetest/share/...
when the actual path is
  /gnu/store/<other-hash>-minetest-data/share/...
If you just want to get the base game to work, it should probably be
okay to add a symlink instead of propagating the input, but this
obviously won't work for third party extensions.

> My question is, what is the Guix way of dealing with such packages?
> Imagine we have like 100 packaged minetest mods/games. Say I wanted
> to
> add one, would I have to recompile the whole minetest package (C++),
> despite the fact all mods are just Lua scripts put into folder and
> interpreted by the engine?
The canonical Guix way is to look for environment variables to set
(usually called STUFF_WERE_LOOKING_FOR_PATH) and add a search path
specification for that in the original package.  Take gstreamer as an
example, for which we define GST_PLUGIN_SYSTEM_PATH.

If the game does not yet support such variables (it appears, Minetest
does indeed have MINETEST_SUBGAME_PATH, but no MINETEST_MOD_PATH in
case you need the latter), consider patching the game itself so that it
does.  If you're lucky, you can even convince people to accept your
patch upstream.  If not or if it's really Guix-specific (as in the case
of GUIX_GTK3_PATH for example), we'll have to carry around that patch
in the Guix tree and keep it updated.

> Could we for example place the mods in the ~/.minetest/games folder?
That's not very functional of you.  In theory, you can put stuff there,
but not using Guix.  As an example, Stepmania reads all its
configuration, data and cache from ~/.stepmania-<version>, so that's of
course where I put the data – data, that is already unfit to be managed
by Guix due to licensing issues, mind you.  In the case of Minetest
mods/games, that folder quickly gets stale however, so I'd not suggest
doing so unless you really need to.

Regards,
Leo

PS: minetest-data sounds like a good candidate for copy-build-system.
PPS: Ignore the older (non-public) mail I sent you mentioning
MINETEST_GAME_PATH instead of MINETEST_SUBGAME_PATH.  At that point, I
had not yet encountered that variable in my research.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]