Re: Updating minetest to 5.6.0?

2022-09-18 Thread Jan Wielkiewicz




On 18.09.2022 13:11, Jan Wielkiewicz wrote:
Okay, I believe I covered all your objections and my changes are good to 
go now.
I sent a patch series to the guix-patches mailing list, unfortunately I 
forgot to send subsequent patches to n...@debbugs.gnu.org (It's almost 2 
years since the last time I contributed anything to Guix).
Should I close these issues and send the series one more time properly 
or should I skip it this time to avoid making even bigger mess?


Jan Wielkiewicz



Never mind. Closed these three issues and sent it properly.

Jan Wielkiewicz



Re: Updating minetest to 5.6.0?

2022-09-18 Thread Jan Wielkiewicz




On 17.09.2022 11:43, Maxime Devos wrote:



On 17-09-2022 02:10, Jan Wielkiewicz wrote:
Done. See the patches (I can't really find "git send-email" on Guix 
for some odd reason). The hacks in the Exile package are quite ugly, 
but I don't know a better way, see below.




Try "guix show git", it will mention a 'send-email' output that you can 
install to have access to 'git send-email'.  See ‘(guix)Packages with 
Multiple Outputs’ on how to install such outputs.


Greetings,
Maxime.


Okay, I believe I covered all your objections and my changes are good to 
go now.
I sent a patch series to the guix-patches mailing list, unfortunately I 
forgot to send subsequent patches to n...@debbugs.gnu.org (It's almost 2 
years since the last time I contributed anything to Guix).
Should I close these issues and send the series one more time properly 
or should I skip it this time to avoid making even bigger mess?


Jan Wielkiewicz



Re: Updating minetest to 5.6.0?

2022-09-17 Thread Maxime Devos



On 17-09-2022 02:13, Jan Wielkiewicz wrote:

Forgot the patches...


Some problems

(1) a single package per patch (minetest-naturalslopeslib can be done in 
a commit before minetest-exile)


(2) no superfluous version prefixes -- remove the "v" from
   (version "v0.3.8") and replace (commit version) by
   (commit (string-append "v" version))

(3) naturalslopeslib is lgpl2.1+, according to the README.md

(4) In minetest-exile, input labels can be avoided by replacing

+(add-after 'install 'install-dependencies
+  (lambda _
+(symlink (string-append
+  #$(this-package-input
+ "minetest-naturalslopeslib")
+ 
"/share/minetest/mods/naturalslopeslib")

+ (string-append
+  #$output
+  "/share/minetest/games/exile/"
+  "mods/naturalslopeslib")))

(5) Going by https://content.minetest.net/packages/Mantar/exile/, more 
specifically its Website link, the home page is 
https://exile.planetofnix.com/wiki/pmwiki.php?n=Main.HomePage


(6) According to the content.minetest.net page, you forgot to mention 
the CC-BY-SA-3.0 license.


(7) Patches need to be sent to guix-patc...@gnu.org, not guix-devel.

(8) I found a directory utilities/ -- IIUC, these bundled mods aren't 
actually used by the game, so they could simply be removed in a snippet 
like minetest-naturalslopeslib


with

   (add-after 'install 'install-dependencies
 (lambda _
   (symlink (search-input-directory inputs 
"share/minetest/mods/naturalslopeslib")

   (string-append
 #$output
 "/share/minetest/games/exile/"
 "mods/naturalslopeslib")))


Some things I can confirm:

(1) the hash for mintest-naturalslopeslib matches
(2) likewise for minetest-exile

Note: I didn't actually try out these patches.

Greetings,
Maxime


OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Updating minetest to 5.6.0?

2022-09-17 Thread Maxime Devos



On 17-09-2022 02:10, Jan Wielkiewicz wrote:
Done. See the patches (I can't really find "git send-email" on Guix for 
some odd reason). The hacks in the Exile package are quite ugly, but I 
don't know a better way, see below.




Try "guix show git", it will mention a 'send-email' output that you can 
install to have access to 'git send-email'.  See ‘(guix)Packages with 
Multiple Outputs’ on how to install such outputs.


Greetings,
Maxime.


OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Updating minetest to 5.6.0?

2022-09-16 Thread Jan Wielkiewicz

Forgot the patches...From 0ec48989fd8cf47c20c2c7181f05469335753514 Mon Sep 17 00:00:00 2001
From: Jan Wielkiewicz 
Date: Sat, 17 Sep 2022 01:10:58 +0200
Subject: [PATCH 2/2] gnu: Add minetest-exile, minetest-naturalslopeslib.

* gnu/packages/minetest.scm (minetest-exile,
minetest-naturalslopeslib): New variables.
---
 gnu/packages/minetest.scm | 61 +++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index 82c0b352bb..dc5dee11bd 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -747,3 +747,64 @@ (define-public minetest-basic-trains
 advtrains up to version 2.2.1.")
 (license (list license:cc-by-sa3.0 license:agpl3+))
 (properties `((upstream-name . "orwell/basic_trains")
+
+(define-public minetest-naturalslopeslib
+  (package
+(name "minetest-naturalslopeslib")
+(version "1.5")
+(source (origin
+  (method git-fetch)
+  (uri (git-reference
+(url
+ "https://files.creativekara.fr/git/naturalslopeslib.git";)
+(commit version)))
+  (sha256
+   (base32
+"19j223lld415496ppk0q0d4g45hxrvygl3axxlmbvqilflsqp6n0"))
+  (file-name (git-file-name name version
+(build-system minetest-mod-build-system)
+(home-page
+ "https://content.minetest.net/packages/karamel/naturalslopeslib/";)
+(synopsis "Natural slopes library for Minetest")
+(description
+ "This Minetest mod is a library that adds stair-like nodes from soft
+ground nodes (sand, dirt, gravel...) that may change shape automatically
+according to their surroundings.")
+(license license:lgpl2.1)))
+
+(define-public minetest-exile
+  (package
+(name "minetest-exile")
+(version "v0.3.8d")
+(source (origin
+  (method git-fetch)
+  (uri (git-reference
+(url "https://github.com/jeremyshannon/Exile/";)
+(commit version)))
+  (file-name (git-file-name name version))
+  (modules '((guix build utils)))
+  (snippet #~(delete-file-recursively "mods/naturalslopeslib"))
+  (sha256
+   (base32
+"1h7792kznhcqrvxn127318dx1v4xbwvffxw7vav22fd85c839c5g"
+(build-system copy-build-system)
+(arguments
+ (list #:install-plan #~'(("." "share/minetest/games/exile"))
+   #:phases #~(modify-phases %standard-phases
+(add-after 'install 'install-dependencies
+  (lambda _
+(symlink (string-append
+  #$(this-package-input
+ "minetest-naturalslopeslib")
+  "/share/minetest/mods/naturalslopeslib")
+ (string-append
+  #$output
+  "/share/minetest/games/exile/"
+  "mods/naturalslopeslib")))
+(inputs (list minetest-naturalslopeslib))
+(synopsis "A survival game for Minetest")
+(description
+ "Exile is a wilderness survival game with simple technology using
+the Minetest game engine.")
+(home-page "https://content.minetest.net/packages/Mantar/exile/";)
+(license license:gpl3)))
-- 
2.37.3

From cf3af84978f8b630d432c2f042ee9b041aa9118d Mon Sep 17 00:00:00 2001
From: Jan Wielkiewicz 
Date: Thu, 15 Sep 2022 22:19:05 +0200
Subject: [PATCH 1/2] gnu: minetest: update to 5.6.0.

* gnu/packages/minetest.scm (minetest, minetest-data): Update to 5.6.0.
* gnu/packages/games.scm (irrlicht-for-minetest): Update to 1.9.0mt7,
[inputs]: add libxi.
---
 gnu/packages/games.scm| 7 +--
 gnu/packages/minetest.scm | 7 ---
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 60ce0167a6..1e2ec71da3 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -73,6 +73,7 @@
 ;;; Copyright © 2022 zamfofex 
 ;;; Copyright © 2022 Gabriel Arazas 
 ;;; Copyright © 2022 Maxim Cournoyer 
+;;; Copyright © 2022 Jan Wielkiewicz 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3626,7 +3627,7 @@ (define-public irrlicht-for-minetest
   (package
 (inherit irrlicht)
 (name "irrlicht-for-minetest")
-(version "1.9.0mt5")
+(version "1.9.0mt7")
 (source
  (origin
(method git-fetch)
@@ -3635,8 +3636,10 @@ (define-public irrlicht-for-minetest
  (commit version)))
(sha256
 (base32
- "1jxk1x0f60n8lrz8a6x62aj2pqg0qnbajsld3lqncvwsfbi0xjx1"
+ "0pgvwfbp9df3xi4fjqngh7mikyklgwxjmrv28s7v35wpg5dz7vhj"
 (build-system cmake-build-system)
+(inputs (modify-inputs (package-inputs irrlicht)
+   (prepend libxi)))
 (arguments
  ;; No ch

Re: Updating minetest to 5.6.0?

2022-09-16 Thread Jan Wielkiewicz




On 16.09.2022 20:18, Maxime Devos wrote:

How about modifying minetest-exile's phases to add a symlink in
#$output /share/minetest/games/exile/mods/naturalslopeslib
pointing to #$(this-package-input "minetest-naturalslopeslib")?

(I don't know how to do that with copy-build-system though, does that 
build system support phases?  I was thinking of a post-install phase or 
a post-unpack)


(Also I don't know if Minetest allows symlinks inside mods)

That way:

   * it doesn't have to be propagated (so naturalslopeslib only appears
 in the (non-game) mod if the user actually asked to install the Guix
 package, and not as a consequence of installing something else

   * by using a symlink instead of a copy, a little space, network IO,
 disk IO and build time is saved, e.g. when the user installs both
 minetest-exile and minetest-naturalslopeslib



Done. See the patches (I can't really find "git send-email" on Guix for 
some odd reason). The hacks in the Exile package are quite ugly, but I 
don't know a better way, see below.


I think it would be feasible to write a 'minetest-game-build-system' to 
mostly automatically do such things, but currently such a thing does not 
exist yet.


Minetest has a pretty ugly way of managing dependencies, actually it 
doesn't manage them at all. So it's either up to (sub)game developers to 
bundle everything into their games or up to users to download all the 
dependencies they want. In the future the game will download 
dependencies automatically which is even worse from our perspective. I 
could possibly try hacking the build system to do something but I'm 
unfamiliar with Guix's guts.




Greetings,
Maxime.



Jan Wielkiewicz



Re: Updating minetest to 5.6.0?

2022-09-16 Thread Maxime Devos

On 16-09-2022 19:57, Jan Wielkiewicz wrote:
Last one question before sending the patches: I'm adding a minetest game 
called Exile and it uses a mod called naturalslopeslib. I packaged both 
of them but Exile expects the lib to be installed in 
"/.guix-profile/share/minetest/games/exile/mods/naturalslopeslib/". 
Should I add the mod as a propagated-input of Exile or should I directly 
copy/link the lib into Exile's tree (if so, how do I go about that)?


How about modifying minetest-exile's phases to add a symlink in
#$output /share/minetest/games/exile/mods/naturalslopeslib
pointing to #$(this-package-input "minetest-naturalslopeslib")?

(I don't know how to do that with copy-build-system though, does that 
build system support phases?  I was thinking of a post-install phase or 
a post-unpack)


(Also I don't know if Minetest allows symlinks inside mods)

That way:

  * it doesn't have to be propagated (so naturalslopeslib only appears
in the (non-game) mod if the user actually asked to install the Guix
package, and not as a consequence of installing something else

  * by using a symlink instead of a copy, a little space, network IO,
disk IO and build time is saved, e.g. when the user installs both
minetest-exile and minetest-naturalslopeslib

I think it would be feasible to write a 'minetest-game-build-system' to 
mostly automatically do such things, but currently such a thing does not 
exist yet.


Greetings,
Maxime.


OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Updating minetest to 5.6.0?

2022-09-16 Thread Jan Wielkiewicz




On 16.09.2022 10:59, Maxime Devos wrote:



On 16-09-2022 00:45, Jan wrote:

The minetest-mod-build-system has some (very basic) tests for testing
that the mods at least load with the new Minetest.
About that, I can never see mods installed with Guix in Minetest. Is 
the build system really working as intended? I'm running the latest 
Guix. Am I missing something? I don't see the mods on the current 
version nor the latest I packaged.


Seems to work over here:

$ guix shell --pure minetest minetest-mesecons
[ in the GUI: ‘Select Mods’ ]
[ GUI: ]
+ mesecons
+ Minetest Game mods

[ in the GUI: select +mesecons ]
[ ...]

Make sure to install Minetest and its mods in the same profile, and to 
log out and in again if it's not done with "guix shell" or "guix 
environment --ad-hoc" but with "guix home" or "guix install", such that 
Guix can set appropriate environment variables (MINETEST_MOD_PATH).


I tried installing a mod by force installing it into 
"share/minetest/mods/modname" using the copy-build-system just like 
mineclone2 is installed, but it doesn't work this way.


minetest-mod-build-system does this too, in 'mod-install-plan'

Greetings,
Maxime.


Thanks, it works now.
I made a mistake and installed it from "guix shell -D guix --pure". Now 
that I installed it from my profile, both mods and games are visible in 
Minetest without a reboot. I also did a quick check and mods appear to work.


Last one question before sending the patches: I'm adding a minetest game 
called Exile and it uses a mod called naturalslopeslib. I packaged both 
of them but Exile expects the lib to be installed in 
"/.guix-profile/share/minetest/games/exile/mods/naturalslopeslib/". 
Should I add the mod as a propagated-input of Exile or should I directly 
copy/link the lib into Exile's tree (if so, how do I go about that)? 
Users can easily download naturalslopeslib through Guix and enable it in 
the game's GUI but some may expect the dependency to be already there. 
My Exile package uses copy-build-system just like mineclone2.



Jan Wielkiewicz



Re: Updating minetest to 5.6.0?

2022-09-16 Thread Maxime Devos



On 16-09-2022 00:45, Jan wrote:

The minetest-mod-build-system has some (very basic) tests for testing
that the mods at least load with the new Minetest.

About that, I can never see mods installed with Guix in Minetest. Is the build 
system really working as intended? I'm running the latest Guix. Am I missing 
something? I don't see the mods on the current version nor the latest I 
packaged.


Seems to work over here:

$ guix shell --pure minetest minetest-mesecons
[ in the GUI: ‘Select Mods’ ]
[ GUI: ]
+ mesecons
+ Minetest Game mods

[ in the GUI: select +mesecons ]
[ ...]

Make sure to install Minetest and its mods in the same profile, and to 
log out and in again if it's not done with "guix shell" or "guix 
environment --ad-hoc" but with "guix home" or "guix install", such that 
Guix can set appropriate environment variables (MINETEST_MOD_PATH).



I tried installing a mod by force installing it into 
"share/minetest/mods/modname" using the copy-build-system just like mineclone2 
is installed, but it doesn't work this way.


minetest-mod-build-system does this too, in 'mod-install-plan'

Greetings,
Maxime.


OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Updating minetest to 5.6.0?

2022-09-15 Thread Jan
> No, Guix does collective maintenance, and AFAIK nobody has made a patch 
> yet or volunteered to keep track of Minetest packages.  If you have a 
> patch, you can simply sent it.

Will do that soon once I sort other things out.

> You can compile them:
>
> $ ./pre-inst-env guix build minetest minetest-worldedit minetest-...

I did successfully compile the game, mineclone2, and some other mods. Generally 
the game works, mineclone2 (a subgame) works and is visible.

> The minetest-mod-build-system has some (very basic) tests for testing 
> that the mods at least load with the new Minetest.

About that, I can never see mods installed with Guix in Minetest. Is the build 
system really working as intended? I'm running the latest Guix. Am I missing 
something? I don't see the mods on the current version nor the latest I 
packaged.

I tried installing a mod by force installing it into 
"share/minetest/mods/modname" using the copy-build-system just like mineclone2 
is installed, but it doesn't work this way.

Any ideas what's wrong?

> For some additional testing, you could create a new world (creative 
> mode), enable all the mods, place blocks of various mods, testing things 
> out.

>> Should I also update games and mods?

> If you want to, but I would say it's only required if otherwise the
> mods 
> fail to load or are otherwise broken by the update.

> Greetings,
> Maxime.


Jan WielkiewiczTemat: Re: Updating minetest to 5.6.0?
Data: 2022-09-15 20:25
Nadawca: "Maxime Devos" <maximede...@telenet.be>
Adresat: "Jan" <tona_kosmicznego_smie...@interia.pl>; guix-devel@gnu.org; 

> 
>> 
> 
> On 15-09-2022 19:59, Jan wrote:
>> Hello,
>> 
>> I almost effortlessly updated the minetest package to 5.6.0 so I
wonder if there's a person who is in charge of updating minetest-related
stuff or should I just send the patch?
> 
> No, Guix does collective maintenance, and AFAIK nobody has made a
patch 
> yet or volunteered to keep track of Minetest packages.  If you have a 
> patch, you can simply sent it.
> 
>> Is there any test procedure for minetest mods and games?
> 
> You can compile them:
> 
> $ ./pre-inst-env guix build minetest minetest-worldedit minetest-...
> 
> The minetest-mod-build-system has some (very basic) tests for testing 
> that the mods at least load with the new Minetest.
> 
> For some additional testing, you could create a new world (creative 
> mode), enable all the mods, place blocks of various mods, testing
things 
> out.
> 
>> Should I also update games and mods?
> 
> If you want to, but I would say it's only required if otherwise the
mods 
> fail to load or are otherwise broken by the update.
> 
> Greetings,
> Maxime.
> 
> 



Re: Updating minetest to 5.6.0?

2022-09-15 Thread Tobias Platen
I'm also working on a VR version of minetest, I'll plan to package that
one too.





Re: Updating minetest to 5.6.0?

2022-09-15 Thread Maxime Devos



On 15-09-2022 19:59, Jan wrote:

Hello,

I almost effortlessly updated the minetest package to 5.6.0 so I wonder if 
there's a person who is in charge of updating minetest-related stuff or should 
I just send the patch?


No, Guix does collective maintenance, and AFAIK nobody has made a patch 
yet or volunteered to keep track of Minetest packages.  If you have a 
patch, you can simply sent it.



Is there any test procedure for minetest mods and games?


You can compile them:

$ ./pre-inst-env guix build minetest minetest-worldedit minetest-...

The minetest-mod-build-system has some (very basic) tests for testing 
that the mods at least load with the new Minetest.


For some additional testing, you could create a new world (creative 
mode), enable all the mods, place blocks of various mods, testing things 
out.


> Should I also update games and mods?

If you want to, but I would say it's only required if otherwise the mods 
fail to load or are otherwise broken by the update.


Greetings,
Maxime.


OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature