diff mbox series

[bug#67200] gnu: Add minetest-server.

Message ID 008d012987a89335df89e1b1c13a553b2fd7fe55.1700049181.git.tristan@cott.am
State New
Headers show
Series [bug#67200] gnu: Add minetest-server. | expand

Commit Message

Tristan Cottam Nov. 15, 2023, 11:53 a.m. UTC
* gnu/packages/minetest.scm (minetest-server): New variable.

Change-Id: I1125888b2944acc4063a19db4c602d33286a7e14
---

This package is a variant of minetest, with modified arguments and dropped
inputs.

About the inputs, I'm having a hard time understanding why certain of them
(i.e. pkg-config, coreutils, libxxf86vm, and ncurses) are specified for
minetest in the first place; the docs make no mention of them, and the package
builds fine without them.

 gnu/packages/minetest.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)


base-commit: bd0f2173210416e86281c1de8789e7cdab66dd57

Comments

Liliana Marie Prikler Nov. 15, 2023, 6:39 p.m. UTC | #1
Am Mittwoch, dem 15.11.2023 um 12:53 +0100 schrieb Tristan Cottam:
> * gnu/packages/minetest.scm (minetest-server): New variable.
> 
> Change-Id: I1125888b2944acc4063a19db4c602d33286a7e14
> ---
> 
> This package is a variant of minetest, with modified arguments and
> dropped
> inputs.
> 
> About the inputs, I'm having a hard time understanding why certain of
> them (i.e. pkg-config, coreutils, libxxf86vm, and ncurses) are
> specified for minetest in the first place; the docs make no mention
> of them, and the package builds fine without them.
pkg-config is nice to have for dependency resolution, though I don't
know whether the current version of minetest makes use of it. 
Coreutils were at one point required to patch rm; I hope minetest now
uses system calls for that.  The other two I don't know.

>  gnu/packages/minetest.scm | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
> 
> diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
> index bf0df314a7..4d658f9e03 100644
> --- a/gnu/packages/minetest.scm
> +++ b/gnu/packages/minetest.scm
> @@ -44,6 +44,7 @@ (define-module (gnu packages minetest)
>    #:use-module (guix packages)
>    #:use-module (guix gexp)
>    #:use-module (guix git-download)
> +  #:use-module (guix utils)
>    #:use-module (guix build-system cmake)
>    #:use-module (guix build-system copy)
>    #:use-module (guix build-system minetest)
> @@ -154,6 +155,41 @@ (define-public minetest
>      (home-page "https://www.minetest.net/")
>      (license license:lgpl2.1+)))
>  
> +(define-public minetest-server
> +  (package
> +    (inherit minetest)
> +    (name "minetest-server")
> +    (arguments
> +     (substitute-keyword-arguments (package-arguments minetest)
> +       ((#:configure-flags configure-flags)
> +        #~(cons* "-DBUILD_CLIENT=FALSE"
> +                 "-DBUILD_SERVER=TRUE"
> +                 #$configure-flags))
> +       ((#:phases phases)
> +        #~(modify-phases #$phases
> +            (replace 'check
> +              (lambda* (#:key tests? #:allow-other-keys)
> +                (when tests?
> +                  (setenv "HOME" "/tmp")
> +                  (invoke "src/minetestserver" "--run-
> unittests"))))))))
> +    (inputs
> +     (modify-inputs (package-inputs minetest)
> +       (delete "libjpeg-turbo"
> +               "libpng"
> +               "libogg"
> +               "libvorbis"
> +               "libxxf86vm"
> +               "mesa"
> +               "openal")))
> +    (synopsis "Infinite-world block sandbox game (server)")
> +    (description
> +     "Minetest is a sandbox construction game.  Players can create
> and destroy
> +various types of blocks in a three-dimensional open world.  This
> allows
> +forming structures in every possible creation, on multiplayer
> servers or as a
> +single player.  Mods and texture packs allow players to personalize
> the game
> +in different ways.  This package provides @command{minetestserver}
> to run a
> +Minetest server.")))
> +
>  (define minetest-data
>    (package
>      (name "minetest-data")
> 
> base-commit: bd0f2173210416e86281c1de8789e7cdab66dd57
LGTM, assuming CI lights green.

Cheers
Tristan Cottam Nov. 15, 2023, 9:31 p.m. UTC | #2
> LGTM, assuming CI lights green.

How can I check?
Liliana Marie Prikler Nov. 15, 2023, 9:49 p.m. UTC | #3
Am Mittwoch, dem 15.11.2023 um 21:31 +0000 schrieb Tristan Cottam:
> > LGTM, assuming CI lights green.
> 
> How can I check?
Wait for https://qa.guix.gnu.org/issue/67200 to process the revision :)
Tristan Cottam Nov. 22, 2023, 8:43 p.m. UTC | #4
I see the QA is failing. What should I do?
Liliana Marie Prikler Nov. 23, 2023, 11:15 a.m. UTC | #5
Am Mittwoch, dem 22.11.2023 um 20:43 +0000 schrieb Tristan Cottam:
> I see the QA is failing. What should I do?
You can try figuring out why

======== Testing module TestLua
Test assertion failed: did_destruct
    at test_lua.cpp:100

fails (probably also affects minetest itself).  That being said, this
is an armhf failure, that's not even worked for minetest, so from my
perspective, the package looks good.

Cheers
Tristan Cottam Nov. 23, 2023, 12:28 p.m. UTC | #6
> > I see the QA is failing. What should I do?
> 
> You can try figuring out why
> 
> ======== Testing module TestLua
> Test assertion failed: did_destruct
> at test_lua.cpp:100
> 
> fails (probably also affects minetest itself).

I saw that error in the logs, I checked out the original file, but I'm unsure
how to proceed from there, apart from filing an issue to Minetest.

> That being said, this is an armhf failure, that's not even worked for
> minetest, so from my perspective, the package looks good.

Awesome, cheers!
Tristan Cottam Dec. 1, 2023, 5:47 p.m. UTC | #7
What does this package still need to be merged upstream? Is further review required?
Liliana Marie Prikler Jan. 14, 2024, 12:07 p.m. UTC | #8
Am Mittwoch, dem 15.11.2023 um 12:53 +0100 schrieb Tristan Cottam:
> * gnu/packages/minetest.scm (minetest-server): New variable.
> 
> Change-Id: I1125888b2944acc4063a19db4c602d33286a7e14
Applied at last.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index bf0df314a7..4d658f9e03 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -44,6 +44,7 @@  (define-module (gnu packages minetest)
   #:use-module (guix packages)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system minetest)
@@ -154,6 +155,41 @@  (define-public minetest
     (home-page "https://www.minetest.net/")
     (license license:lgpl2.1+)))
 
+(define-public minetest-server
+  (package
+    (inherit minetest)
+    (name "minetest-server")
+    (arguments
+     (substitute-keyword-arguments (package-arguments minetest)
+       ((#:configure-flags configure-flags)
+        #~(cons* "-DBUILD_CLIENT=FALSE"
+                 "-DBUILD_SERVER=TRUE"
+                 #$configure-flags))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (setenv "HOME" "/tmp")
+                  (invoke "src/minetestserver" "--run-unittests"))))))))
+    (inputs
+     (modify-inputs (package-inputs minetest)
+       (delete "libjpeg-turbo"
+               "libpng"
+               "libogg"
+               "libvorbis"
+               "libxxf86vm"
+               "mesa"
+               "openal")))
+    (synopsis "Infinite-world block sandbox game (server)")
+    (description
+     "Minetest is a sandbox construction game.  Players can create and destroy
+various types of blocks in a three-dimensional open world.  This allows
+forming structures in every possible creation, on multiplayer servers or as a
+single player.  Mods and texture packs allow players to personalize the game
+in different ways.  This package provides @command{minetestserver} to run a
+Minetest server.")))
+
 (define minetest-data
   (package
     (name "minetest-data")