diff mbox series

[bug#50425] gnu: Add minetest-advtrains.

Message ID b4c0387688c3197484f96ea46f2c800b64b77faf.camel@planete-kraus.eu
State Accepted
Headers show
Series [bug#50425] gnu: Add minetest-advtrains. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Vivien Kraus Sept. 6, 2021, 11:56 a.m. UTC
Hello Maxime,

Le lundi 06 septembre 2021 à 13:17 +0200, Maxime Devos a écrit :
> Did the minetest importer work well for you?
I noticed 3 minor things:
1. The advtrain dependency on basic-trains was duplicated, I had to
remove one occurence;
2. The version number came prefixed with a "v" that I had to remove;
3. It was not able to get the commit ID and the hash for minetest-
advtrains, I had to fill it in myself (it was set to #f). Presumably
because of the exotic tag name.

That’s not counting the markdown and license issues, these are out of
scope indeed.

> Package descriptions are in texinfo, not markdown.  You'll need
> to make the necessary adjustments.
I updated the patch to account for an @itemize instead of dash
enumerations, I think it was the only thing missing.

> According to 
> http://git.bananach.space/basic_trains.git/tree/license.txt,
> it's agpl3+ actually.

You’re right, advtrains too: 
https://git.bananach.space/advtrains.git/tree/license.txt
I updated the patch.

Also, when I run ./etc/indent-code.el gnu/packages/minetest, there are
some re-indentations that happen for othe minetest packages. Thus, I’m
not sure what indentation and general style I should adopt. Hopefully
this problem will be fixed by guix style :)

Vivien

Comments

M Sept. 7, 2021, 10:20 a.m. UTC | #1
Vivien Kraus schreef op ma 06-09-2021 om 13:56 [+0200]:
> Hello Maxime,
> 
> Le lundi 06 septembre 2021 à 13:17 +0200, Maxime Devos a écrit :
> > Did the minetest importer work well for you?
> I noticed 3 minor things:
> 1. The advtrain dependency on basic-trains was duplicated, I had to
> remove one occurence;

I can reproduce this with ‘guix import minetest --recursive orwell/basic_trains’.
Presumably the issue is that advtrains is listed twice in the dependencies
on ContentDB, as ‘advtrains’ and ‘advtrains_train_track’.  I'll send a patch
to remove duplicates.

> 2. The version number came prefixed with a "v" that I had to remove;

The importer uses the ‘release title’ as version number.  Apparently
the release titles for orwell/advtrains include a "v" prefix.  I'll
send a patch to remove the prefix.

> 3. It was not able to get the commit ID and the hash for minetest-
> advtrains, I had to fill it in myself (it was set to #f). Presumably
> because of the exotic tag name.

FWIW, the minetest importer doesn't look at git tag names, it just copies
the commit from ContentDB.  And in case of advtrains, the commit is
not available there, so the importer sets it to #false.
<https://content.minetest.net/api/packages/orwell/advtrains/releases/>.

> [...]
> 
> Also, when I run ./etc/indent-code.el gnu/packages/minetest, there are
> some re-indentations that happen for othe minetest packages. Thus, I’m
> not sure what indentation and general style I should adopt. Hopefully
> this problem will be fixed by guix style :)

The indentation from "./etc/indent-code.el" should be good.  Feel free
to precedede the ‘gnu: Add minetest-advtrains’ patch with a patch fixing
the indentation.

Greetings,
Maime.
diff mbox series

Patch

From 36b3170366205e761c57665f19dba1a581ca9053 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 5 Sep 2021 15:21:35 +0200
Subject: [PATCH] gnu: add minetest-advtrains

* gnu/packages/minetest.scm (minetest-advtrains): New variable.
* gnu/packages/minetest.scm (minetest-basic-trains): New variable.
---
 gnu/packages/minetest.scm | 68 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index 5453f4d16a..80151b8de6 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -624,3 +624,71 @@  track of important locations.")
                    license:cc-by4.0 license:cc-by-sa3.0 license:public-domain
                    license:cc0 license:fdl1.2+))
     (properties `((upstream-name . "RealBadAngel/unified_inventory")))))
+
+(define-public minetest-advtrains
+  (package
+    (name "minetest-advtrains")
+    (version "2.3.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.bananach.space/advtrains.git")
+             (commit "release-2.3.1")))
+       (sha256
+        (base32 "1ijqlchh269jpvmgmdmdvy3nsnk0bszkvvcqk6vaysvxam695ggw"))
+       (file-name (git-file-name name version))))
+    (build-system minetest-mod-build-system)
+    (home-page "http://advtrains.de/")
+    (synopsis
+     "Adds good-looking, realistic trains with realistic rails.")
+    (description
+     "This mod features realistic trains and various equipment for railways, with a focus on automated train operation.
+
+Main features:
+
+@itemize
+@item
+almost-realistic tracks with actual curves and switches;
+@item
+railway signals, controllable by various means;
+@item
+ATC: simple, command-like automatic train control;
+@item
+LuaATC: Powerful Lua-scripted automatic train operation (requires some programming knowledge);
+@item
+an interlocking system, featuring track sections, routes and automatic stopping before signals.
+@end itemize")
+    (license
+     (list license:cc-by-sa3.0 license:agpl3+))
+    (properties
+     `((upstream-name . "orwell/advtrains")))))
+
+(define-public minetest-basic-trains
+  (package
+    (name "minetest-basic-trains")
+    (version "1.0.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "http://git.bananach.space/basic_trains.git/")
+             (commit
+              "d44c410f7c2a7202ee68b66fc50febae89e0c5dc")))
+       (sha256
+        (base32
+         "0vvzndj48kgdz2bfgivfm217sbmc2lmxpp2mispcy7byn4i26prx"))
+       (file-name (git-file-name name version))))
+    (build-system minetest-mod-build-system)
+    (propagated-inputs
+     `(("minetest-advtrains" ,minetest-advtrains)))
+    (home-page
+     "http://advtrains.de/wiki/doku.php?id=usage:trains:basic_trains")
+    (synopsis
+     "Collection of basic trains for the Advanced Trains mod. Formerly included in main advtrains modpack (until 2.3.0)")
+    (description
+     "This modpack contains the trains which were the \"default\" trains in advtrains up to version 2.2.1.")
+    (license
+     (list license:cc-by-sa3.0 license:agpl3+))
+    (properties
+     `((upstream-name . "orwell/basic_trains")))))
-- 
2.33.0