Subject: bug#50677: closed (Re: bug#50677: [PATCH] Minetest basic_materials really depends on moreores)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 16 Oct 2021 15:49:02 +0000

Your bug report

#50677: [PATCH] Minetest basic_materials really depends on moreores

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
50677: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50677
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#50677: [PATCH] Minetest basic_materials really depends on moreores
From: Tobias Geerinckx-Rice <[email-masked]>
To: Vivien Kraus <[email-masked]>
Cc: [email-masked]
Date: Sat, 16 Oct 2021 17:32:07 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Vivien,

Thanks!  I've pushed this series as 
df2404482495bc3af03e7fc902af1e6b0d10b4a4 et al.

I made a only few small tweaks, mainly to the commit message:

> gnu: minetest-basic-materials: Depend on minetest-moreores.

‘Depend’ sounds wrong to me; it either does, or it doesn't, we 
don't determine that.  Changed to ‘Propagate …’

> * minetest.scm (minetest-basic-materials): Add minetest-moreores 
> as a propagated input.

Keep Git commit message body lines <=72 characters.  Most 
(non-Guix) tooling is built around that assumption.

Also use full relative file names, and use [field] notation where 
appropriate:

  * gnu/packages/foo.scm (foo)[propagated-inputs]: Add bar.

For the build system patches, I changed

> guix: minetest-build-system: […]

to

  build-system/minetest: […]

Why?  Because it's shorter.  Is this a documented rule?  I can't 
say!

> ;; basic_materials:silver_wire cannot be crafted without
> ;; moreores:silver_ingot.

Documenting this is a great idea.

> (commit "0b6f669df4c9b7771c03e0e6ba8effb471cdfcae")))

I changed this to

  (commit (string-append "v" version))

to use the git tag.

Both have advantages & disadvantages, but this is our currently 
preferred style.

> (synopsis "Adds new ore types")
> (description "More ores for Minetest.")

These aren't acceptable.  See (guix)Synopses and Descriptions.

This was my attempt at improving the importer's lazywork:

  (synopsis "Additional ore types, tools, swords, and rails for 
  Minetest")
  (description
   "This Minetest mod adds new ore types to the game (mithril, 
   silver) as well
as swords and tools made of different materials.  It also adds 
copper rails.")

Bit vague, but you know why.

Closing; thanks!

T G-R

Subject: [PATCH] Minetest basic_materials really depends on moreores
From: Vivien Kraus <[email-masked]>
To: [email-masked]
Date: Sun, 19 Sep 2021 17:23:50 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear guix,

basic_materials actually requires moreores, otherwise some craft
recipes are just not possible. For instance,
basic_materials:silver_wire can only be crafted with
moreores:silver_ingot. This silver wire is actually needed for basic
technic machines, such as the LV compressor.

So, let’s add minetest-moreores!

Vivien
From 29ad4ee950fae906c90c512dedde7b5198f09f63 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Sun, 19 Sep 2021 17:00:45 +0200
Subject: [PATCH 2/2] gnu: minetest-basic-materials: Depend on
 minetest-moreores.

* minetest.scm (minetest-basic-materials): Add minetest-moreores as a propagated input.
---
 gnu/packages/minetest.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index 49e5a00fd2..9bcd470634 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -230,6 +230,10 @@ numeric identifier TOPIC-ID on the official Minetest forums."
         (base32 "0v6l3lrjgshy4sccjhfhmfxc3gk0cdy73qb02i9wd2vw506v5asx"))
        (file-name (git-file-name name version))))
     (build-system minetest-mod-build-system)
+    (propagated-inputs
+     ;; basic_materials:silver_wire cannot be crafted without
+     ;; moreores:silver_ingot.
+     `(("minetest-moreores" ,minetest-moreores)))
     (home-page (minetest-topic 21000))
     (synopsis "Some \"basic\" materials and items for other Minetest mods to use")
     (description
-- 
2.33.0

From 7beb382034560802e189a6494b6de40818cc1755 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Sun, 19 Sep 2021 16:58:53 +0200
Subject: [PATCH 1/2] gnu: Add minetest-moreores.

* gnu/packages/minetest.scm (minetest-moreores): New variable.
---
 gnu/packages/minetest.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index fd1439d4d2..49e5a00fd2 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -187,6 +187,34 @@ numeric identifier TOPIC-ID on the official Minetest forums."
   (string-append "https://forum.minetest.net/viewtopic.php?t="
                  (number->string topic-id)))
 
+(define-public minetest-moreores
+  (package
+    (name "minetest-moreores")
+    (version "v2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/minetest-mods/moreores")
+             (commit "0b6f669df4c9b7771c03e0e6ba8effb471cdfcae")))
+       (sha256 (base32 "1chfqbc6bb27aacjc67j5l5wcdvmcsvk2rfmangipd7nwini3y34"))
+       (file-name (git-file-name name version))))
+    (build-system minetest-mod-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-_config.txt
+           (lambda* (#:key inputs #:allow-other-keys)
+             (copy-file
+              "_config.txt"
+              (string-append %output "/share/minetest/mods/moreores/_config.txt"))
+             #t)))))
+    (home-page (minetest-topic 549))
+    (synopsis "Adds new ore types")
+    (description "More ores for Minetest.")
+    (license license:zlib)
+    (properties `((upstream-name . "Calinou/moreores")))))
+
 (define-public minetest-basic-materials
   (package
     (name "minetest-basic-materials")
-- 
2.33.0