[PATCH 0/3] gnu: Add mc2mt.

  • Open
  • quality assurance status badge
Details
2 participants
  • Adam Faiz
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Adam Faiz
Severity
normal
A
A
Adam Faiz wrote on 30 Jun 2023 11:10
(address . guix-patches@gnu.org)
d950b1b6-6c12-3019-50b2-0c312ea752cc@disroot.org
From f571371568c1c783bd8d269eec9cea6b9bf55b39 Mon Sep 17 00:00:00 2001
Message-Id: <cover.1688115598.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 30 Jun 2023 16:59:58 +0800
Subject: [PATCH 0/3] gnu: Add mc2mt.

This patch series adds mc2mt, a Minecraft to Minetest world converter.

AwesomeAdam54321 (3):
gnu: Add python-nbt.
gnu: Add python-anvil-parser.
gnu: Add mc2mt.

gnu/packages/game-development.scm | 107 ++++++++++++++++++++++++++++++
1 file changed, 107 insertions(+)


base-commit: f25529b08e356f89ca7cecc44295085531a8faba
--
2.40.1
A
A
Adam Faiz wrote on 30 Jun 2023 11:21
[PATCH 1/3] gnu: Add python-nbt.
(address . 64362@debbugs.gnu.org)
6a3d5c55-d481-e3dc-f423-eb7f6c8313b9@disroot.org
From 8650c4e383b9cb3941db42227f69d2aa7decfb67 Mon Sep 17 00:00:00 2001
Message-Id: <8650c4e383b9cb3941db42227f69d2aa7decfb67.1688115598.git.adam.faiz@disroot.org>
In-Reply-To: <cover.1688115598.git.adam.faiz@disroot.org>
References: <cover.1688115598.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 30 Jun 2023 16:33:28 +0800
Subject: [PATCH 1/3] gnu: Add python-nbt.

* gnu/packages/game-development.scm (python-nbt): New variable.
---
gnu/packages/game-development.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 1b93773b6d..9fcfe468ef 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -442,6 +442,23 @@ (define-public nml
files) into @file{.grf} and/or @file{.nfo} files.")
(license license:gpl2+)))
+(define-public python-nbt
+ (package
+ (name "python-nbt")
+ (version "1.5.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "NBT" version))
+ (sha256
+ (base32
+ "1i9ncrzy5zcfnxzkh2j31n9ayzxfncckzwa6fkz9vjq5fq9v4fys"))))
+ (build-system python-build-system)
+ (home-page "http://github.com/twoolie/NBT")
+ (synopsis "Named Binary Tag reader/writer")
+ (description "This library is a parser/writer for the NBT file format,
+and it's container the RegionFile. It can inspect and edit Minecraft data files.")
+ (license license:expat)))
+
(define-public python-sge
(package
(name "python-sge")
--
2.40.1
A
A
Adam Faiz wrote on 30 Jun 2023 11:22
[PATCH 2/3] gnu: Add python-anvil-parser.
(address . 64362@debbugs.gnu.org)
459fc17f-c9ea-c345-99f8-558e544740ed@disroot.org
From 9a63ff079e0dae175651e9a4f65e03cc6f3892b4 Mon Sep 17 00:00:00 2001
Message-Id: <9a63ff079e0dae175651e9a4f65e03cc6f3892b4.1688116740.git.adam.faiz@disroot.org>
In-Reply-To: <cover.1688116740.git.adam.faiz@disroot.org>
References: <cover.1688116740.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 30 Jun 2023 16:44:20 +0800
Subject: [PATCH 2/3] gnu: Add python-anvil-parser.

* gnu/packages/game-development.scm (python-anvil-parser): New variable.
---
gnu/packages/game-development.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 9fcfe468ef..52f8a3787d 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -442,6 +442,28 @@ (define-public nml
files) into @file{.grf} and/or @file{.nfo} files.")
(license license:gpl2+)))
+(define-public python-anvil-parser
+ (let ((commit "27544bb41f035617be130a209a84371cbaf837cc")
+ (revision "0"))
+ (package
+ (name "python-anvil-parser")
+ (version (git-version "0.9.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/0xTiger/anvil-parser")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "196nli36pz4sllx1m8jlys661hgbxhcxr2c4545fqb4nd27hhwy7"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-frozendict python-nbt))
+ (home-page "https://github.com/0xTiger/anvil-parser")
+ (synopsis "Minecraft anvil file format parser")
+ (description "This package provides a Minecraft anvil file format parser.")
+ (license license:expat))))
+
(define-public python-nbt
(package
(name "python-nbt")
--
2.40.1
A
A
Adam Faiz wrote on 30 Jun 2023 11:34
[PATCH 3/3] gnu: Add mc2mt.
(address . 64362@debbugs.gnu.org)
77adeda8-6ab9-19f5-4b47-bed7a9f12a42@disroot.org
From 0555ce12cecf1f5244d9ca973a7686b3d9d5bc3d Mon Sep 17 00:00:00 2001
Message-Id: <0555ce12cecf1f5244d9ca973a7686b3d9d5bc3d.1688116740.git.adam.faiz@disroot.org>
In-Reply-To: <cover.1688116740.git.adam.faiz@disroot.org>
References: <cover.1688116740.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 30 Jun 2023 16:56:23 +0800
Subject: [PATCH 3/3] gnu: Add mc2mt.

* gnu/packages/game-development.scm (mc2mt): New variable.
---
gnu/packages/game-development.scm | 68 +++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)

Toggle diff (88 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 52f8a3787d..6a5656e3f3 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -56,6 +56,7 @@ (define-module (gnu packages game-development)
#:use-module (guix utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix build-system scons)
#:use-module (gnu packages)
@@ -1744,6 +1745,73 @@ (define-public ois
(home-page "https://github.com/wgois/OIS")
(license license:zlib)))
+(define-public mc2mt
+ (let ((commit "039dbc26466a430e03c646dc5a9bd0822637a87a")
+ (revision "0"))
+ (package
+ (name "mc2mt")
+ (version (git-version "0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/listia/mc2mt")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1vnaznwgm87x0n5dp14363p2h54lpzalynrrd6lbs6wgrqq7fq9i"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (copy-recursively "mc2mt.py" "mc2mtlib/mc2mt.py")
+ (substitute* "mc2mtlib/__init__.py"
+ (("from . import minetest_world" all)
+ (string-append "from . import mc2mt\n"
+ all)))
+ (substitute* "mc2mtlib/argument_parser.py"
+ (("mineclone2") "mineclone"))
+ (substitute* "mc2mtlib/mc2mt.py"
+ (("if __name__ == '__main__':")
+ "def mc2mt():")
+ (("(from mc2mtlib import )\\*" all import)
+ (string-append
+ import "argument_parser\n"
+ import "minetest_world\n"
+ import "blob_writer\n"
+ import "block_functions\n"
+ import "block_conversion\n"
+ import "section_conversion\n\n"
+ "parse_args = argument_parser.parser.parse_args")))
+ (with-output-to-file "MANIFEST.in"
+ (lambda _
+ (format #t
+ "\
+include mc2mtlib/mods/*.json~%")))
+ (with-output-to-file "pyproject.toml"
+ (lambda _
+ (format #t
+ "\
+[build-system]~@
+requires = ['setuptools']~@
+build-backend = 'setuptools.build_meta'~@
+~@
+[project]~@
+name = 'mc2mt'~@
+version = '0.1'~@
+dependencies = ['anvil-parser']~@
+~@
+[project.scripts]~@
+mc2mt = 'mc2mtlib:mc2mt.mc2mt'~%")))))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-anvil-parser))
+ (arguments
+ (list #:tests? #f)) ; no tests
+ (synopsis "Minecraft to Minetest world converter")
+ (description "@code{mc2mt} is a Minecraft to Minetest world converter.
+It can convert worlds from Minecraft 1.9 and later.")
+ (home-page "https://github.com/listia/mc2mt")
+ (license license:expat))))
+
(define-public mygui
(package
(name "mygui")
--
2.40.1
L
L
Liliana Marie Prikler wrote on 30 Jun 2023 20:23
(address . iyzsong@envs.net)
43ba5dee30a02e26492f0ae8b29946bf88d9e652.camel@gmail.com
Am Freitag, dem 30.06.2023 um 17:34 +0800 schrieb Adam Faiz:
Toggle quote (92 lines)
> From 0555ce12cecf1f5244d9ca973a7686b3d9d5bc3d Mon Sep 17 00:00:00
> 2001
> Message-Id:
> <0555ce12cecf1f5244d9ca973a7686b3d9d5bc3d.1688116740.git.adam.faiz@di
> sroot.org>
> In-Reply-To: <cover.1688116740.git.adam.faiz@disroot.org>
> References: <cover.1688116740.git.adam.faiz@disroot.org>
> From: AwesomeAdam54321 <adam.faiz@disroot.org>
> Date: Fri, 30 Jun 2023 16:56:23 +0800
> Subject: [PATCH 3/3] gnu: Add mc2mt.
>
> * gnu/packages/game-development.scm (mc2mt): New variable.
> ---
>  gnu/packages/game-development.scm | 68
> +++++++++++++++++++++++++++++++
>  1 file changed, 68 insertions(+)
>
> diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-
> development.scm
> index 52f8a3787d..6a5656e3f3 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
> @@ -56,6 +56,7 @@ (define-module (gnu packages game-development)
>    #:use-module (guix utils)
>    #:use-module (guix build-system cmake)
>    #:use-module (guix build-system gnu)
> +  #:use-module (guix build-system pyproject)
>    #:use-module (guix build-system python)
>    #:use-module (guix build-system scons)
>    #:use-module (gnu packages)
> @@ -1744,6 +1745,73 @@ (define-public ois
>      (home-page "https://github.com/wgois/OIS")
>      (license license:zlib)))
>  
> +(define-public mc2mt
> +  (let ((commit "039dbc26466a430e03c646dc5a9bd0822637a87a")
> +        (revision "0"))
> +  (package
> +    (name "mc2mt")
> +    (version (git-version "0.1" revision commit))
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/listia/mc2mt")
> +             (commit commit)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32
> "1vnaznwgm87x0n5dp14363p2h54lpzalynrrd6lbs6wgrqq7fq9i"))
> +       (modules '((guix build utils)))
> +       (snippet
> +        #~(begin
> +            (copy-recursively "mc2mt.py" "mc2mtlib/mc2mt.py")
> +            (substitute* "mc2mtlib/__init__.py"
> +              (("from . import minetest_world" all)
> +               (string-append "from . import mc2mt\n"
> +                              all)))
> +            (substitute* "mc2mtlib/argument_parser.py"
> +              (("mineclone2") "mineclone"))
> +            (substitute* "mc2mtlib/mc2mt.py"
> +              (("if __name__ == '__main__':")
> +               "def mc2mt():")
> +              (("(from mc2mtlib import )\\*" all import)
> +               (string-append
> +                import "argument_parser\n"
> +                import "minetest_world\n"
> +                import "blob_writer\n"
> +                import "block_functions\n"
> +                import "block_conversion\n"
> +                import "section_conversion\n\n"
> +                "parse_args = argument_parser.parser.parse_args")))
> +            (with-output-to-file "MANIFEST.in"
> +              (lambda _
> +                (format #t
> +                        "\
> +include mc2mtlib/mods/*.json~%")))
> +            (with-output-to-file "pyproject.toml"
> +              (lambda _
> +                (format #t
> +                        "\
> +[build-system]~@
> +requires = ['setuptools']~@
> +build-backend = 'setuptools.build_meta'~@
> +~@
> +[project]~@
> +name = 'mc2mt'~@
> +version = '0.1'~@
> +dependencies = ['anvil-parser']~@
> +~@
> +[project.scripts]~@
> +mc2mt = 'mc2mtlib:mc2mt.mc2mt'~%")))))))
This snippet looks like you really want to write a patch or two.
Toggle quote (11 lines)
> +    (build-system pyproject-build-system)
> +    (propagated-inputs (list python-anvil-parser))
> +    (arguments
> +     (list #:tests? #f)) ; no tests
> +    (synopsis "Minecraft to Minetest world converter")
> +    (description "@code{mc2mt} is a Minecraft to Minetest world
> converter.
> +It can convert worlds from Minecraft 1.9 and later.")
> +    (home-page "https://github.com/listia/mc2mt")
> +    (license license:expat))))
> +
I think we should tone down on the usage of "Minecraft" in synopses and
descriptions. In particular for the dependencies it ought to describe
the file formats without referring to the program that produces them.

Cheers
A
A
Adam Faiz wrote on 1 Jul 2023 05:20
(address . iyzsong@envs.net)
fa948fc4-a15b-0159-1072-2d2063f8f6fa@disroot.org
On 7/1/23 02:23, Liliana Marie Prikler wrote:
Toggle quote (2 lines)
> Am Freitag, dem 30.06.2023 um 17:34 +0800 schrieb Adam Faiz:
> This snippet looks like you really want to write a patch or two.
You're right, I should have done it as a patch, but I didn't because I don't know how to use
commit message templates for Guix commits.
I always check similiar commits and paste the commit message as a template which is tedious.

Toggle quote (14 lines)
>> +    (build-system pyproject-build-system)
>> +    (propagated-inputs (list python-anvil-parser))
>> +    (arguments
>> +     (list #:tests? #f)) ; no tests
>> +    (synopsis "Minecraft to Minetest world converter")
>> +    (description "@code{mc2mt} is a Minecraft to Minetest world
>> converter.
>> +It can convert worlds from Minecraft 1.9 and later.")
>> +    (home-page "https://github.com/listia/mc2mt")
>> +    (license license:expat))))
>> +
> I think we should tone down on the usage of "Minecraft" in synopses and
> descriptions. In particular for the dependencies it ought to describe
> the file formats without referring to the program that produces them.
Alright.

Toggle quote (1 lines)
> Cheers
L
L
Liliana Marie Prikler wrote on 1 Jul 2023 07:31
(address . iyzsong@envs.net)
06b84aed8e4ec053bcd3881c585b85e3a9c23abf.camel@gmail.com
Am Samstag, dem 01.07.2023 um 11:20 +0800 schrieb Adam Faiz:
Toggle quote (8 lines)
> On 7/1/23 02:23, Liliana Marie Prikler wrote:
> > Am Freitag, dem 30.06.2023 um 17:34 +0800 schrieb Adam Faiz:
> > This snippet looks like you really want to write a patch or two.
> You're right, I should have done it as a patch, but I didn't because
> I don't know how to use
> commit message templates for Guix commits.
> I always check similiar commits and paste the commit message as a
> template which is tedious.
For a patch, add

* gnu/packages/patches/my-patch.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.

Cheers
A
A
Adam Faiz wrote on 1 Jul 2023 13:40
[PATCH v1 1/3] gnu: Add python-nbt.
f84d4007-9185-6d1c-fa2d-2be21462373e@disroot.org
From 8886dce031a397faa7f9bbf15cc1a195667ad9c6 Mon Sep 17 00:00:00 2001
Message-Id: <8886dce031a397faa7f9bbf15cc1a195667ad9c6.1688211506.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 30 Jun 2023 16:33:28 +0800
Subject: [PATCH v1 1/3] gnu: Add python-nbt.

* gnu/packages/game-development.scm (python-nbt): New variable.
---
gnu/packages/game-development.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 1b93773b6d..446a3c2b1b 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -442,6 +442,23 @@ (define-public nml
files) into @file{.grf} and/or @file{.nfo} files.")
(license license:gpl2+)))
+(define-public python-nbt
+ (package
+ (name "python-nbt")
+ (version "1.5.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "NBT" version))
+ (sha256
+ (base32
+ "1i9ncrzy5zcfnxzkh2j31n9ayzxfncckzwa6fkz9vjq5fq9v4fys"))))
+ (build-system python-build-system)
+ (home-page "http://github.com/twoolie/NBT")
+ (synopsis "Named Binary Tag reader/writer")
+ (description "This library is a parser/writer for the NBT file format,
+and it's container the RegionFile.")
+ (license license:expat)))
+
(define-public python-sge
(package
(name "python-sge")

base-commit: f25529b08e356f89ca7cecc44295085531a8faba
--
2.40.1
A
A
Adam Faiz wrote on 1 Jul 2023 13:42
[PATCH v1 2/3] gnu: Add python-anvil-parser.
40c7484f-a0ac-86de-ad5b-22e0bf1b1b1e@disroot.org
From 20f99f50f698235c88daebd3a9638e96b7a61dbf Mon Sep 17 00:00:00 2001
Message-Id: <20f99f50f698235c88daebd3a9638e96b7a61dbf.1688211506.git.adam.faiz@disroot.org>
In-Reply-To: <8886dce031a397faa7f9bbf15cc1a195667ad9c6.1688211506.git.adam.faiz@disroot.org>
References: <8886dce031a397faa7f9bbf15cc1a195667ad9c6.1688211506.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 30 Jun 2023 16:44:20 +0800
Subject: [PATCH v1 2/3] gnu: Add python-anvil-parser.

* gnu/packages/game-development.scm (python-anvil-parser): New variable.
---
gnu/packages/game-development.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 446a3c2b1b..503c5e1f73 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -442,6 +442,28 @@ (define-public nml
files) into @file{.grf} and/or @file{.nfo} files.")
(license license:gpl2+)))
+(define-public python-anvil-parser
+ (let ((commit "27544bb41f035617be130a209a84371cbaf837cc")
+ (revision "0"))
+ (package
+ (name "python-anvil-parser")
+ (version (git-version "0.9.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/0xTiger/anvil-parser")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "196nli36pz4sllx1m8jlys661hgbxhcxr2c4545fqb4nd27hhwy7"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-frozendict python-nbt))
+ (home-page "https://github.com/0xTiger/anvil-parser")
+ (synopsis "Anvil file format parser")
+ (description "This package provides an Anvil file format parser.")
+ (license license:expat))))
+
(define-public python-nbt
(package
(name "python-nbt")
--
2.40.1
A
A
Adam Faiz wrote on 1 Jul 2023 13:44
[PATCH v1 3/3] gnu: Add mc2mt.
(address . 64362@debbugs.gnu.org)(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
4244fe1a-4433-d220-877f-45b01e63f40f@disroot.org
From 842787570d8e82671c96560ccb03656b04dc7325 Mon Sep 17 00:00:00 2001
Message-Id: <842787570d8e82671c96560ccb03656b04dc7325.1688211506.git.adam.faiz@disroot.org>
In-Reply-To: <8886dce031a397faa7f9bbf15cc1a195667ad9c6.1688211506.git.adam.faiz@disroot.org>
References: <8886dce031a397faa7f9bbf15cc1a195667ad9c6.1688211506.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 30 Jun 2023 16:56:23 +0800
Subject: [PATCH v1 3/3] gnu: Add mc2mt.

* gnu/packages/game-development.scm (mc2mt): New variable.
* gnu/packages/patches/mc2mt-add-packaging-support.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
---
gnu/local.mk | 1 +
gnu/packages/game-development.scm | 27 ++++++
.../patches/mc2mt-add-packaging-support.patch | 85 +++++++++++++++++++
3 files changed, 113 insertions(+)
create mode 100644 gnu/packages/patches/mc2mt-add-packaging-support.patch

Toggle diff (150 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index b4e8fd0b42..57cae21761 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1572,6 +1572,7 @@ dist_patch_DATA = \
%D%/packages/patches/maxima-defsystem-mkdir.patch \
%D%/packages/patches/maven-generate-component-xml.patch \
%D%/packages/patches/maven-generate-javax-inject-named.patch \
+ %D%/packages/patches/mc2mt-add-packaging-support.patch \
%D%/packages/patches/mcrl2-fix-1687.patch \
%D%/packages/patches/mcrl2-fix-counterexample.patch \
%D%/packages/patches/mcrypt-CVE-2012-4409.patch \
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 503c5e1f73..c9e45c8ea2 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -56,6 +56,7 @@ (define-module (gnu packages game-development)
#:use-module (guix utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix build-system scons)
#:use-module (gnu packages)
@@ -1744,6 +1745,32 @@ (define-public ois
(home-page "https://github.com/wgois/OIS")
(license license:zlib)))
+(define-public mc2mt
+ (let ((commit "039dbc26466a430e03c646dc5a9bd0822637a87a")
+ (revision "0"))
+ (package
+ (name "mc2mt")
+ (version (git-version "0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/listia/mc2mt")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1vnaznwgm87x0n5dp14363p2h54lpzalynrrd6lbs6wgrqq7fq9i"))
+ (patches (search-patches "mc2mt-add-packaging-support.patch"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-anvil-parser))
+ (arguments
+ (list #:tests? #f)) ; no tests
+ (synopsis "Minecraft to Minetest world converter")
+ (description "@code{mc2mt} is a Minecraft to Minetest world converter.
+It can convert worlds from Minecraft 1.9 and later.")
+ (home-page "https://github.com/listia/mc2mt")
+ (license license:expat))))
+
(define-public mygui
(package
(name "mygui")
diff --git a/gnu/packages/patches/mc2mt-add-packaging-support.patch b/gnu/packages/patches/mc2mt-add-packaging-support.patch
new file mode 100644
index 0000000000..9a764132d3
--- /dev/null
+++ b/gnu/packages/patches/mc2mt-add-packaging-support.patch
@@ -0,0 +1,85 @@
+From 84ebbd6001d7cde552dd5b9da5c0528e476ab53d Mon Sep 17 00:00:00 2001
+From: AwesomeAdam54321 <adam.faiz@disroot.org>
+Date: Fri, 30 Jun 2023 22:08:46 +0800
+Subject: [PATCH] mc2mt: Add packaging support.
+
+* MANIFEST.in: Add it.
+* mc2mt.py -> mc2mtlib/mc2mt.py: Move mc2mt.py functionality here.
+* pyproject.toml: Add project specification.
+---
+ MANIFEST.in | 1 +
+ mc2mtlib/__init__.py | 1 +
+ mc2mt.py => mc2mtlib/mc2mt.py | 11 +++++++++--
+ pyproject.toml | 11 +++++++++++
+ 4 files changed, 22 insertions(+), 2 deletions(-)
+ create mode 100644 MANIFEST.in
+ rename mc2mt.py => mc2mtlib/mc2mt.py (90%)
+ mode change 100755 => 100644
+ create mode 100644 pyproject.toml
+
+diff --git a/MANIFEST.in b/MANIFEST.in
+new file mode 100644
+index 0000000..d5914df
+--- /dev/null
++++ b/MANIFEST.in
+@@ -0,0 +1 @@
++include mc2mtlib/mods/*.json
+diff --git a/mc2mtlib/__init__.py b/mc2mtlib/__init__.py
+index 047fcf2..315b5dc 100644
+--- a/mc2mtlib/__init__.py
++++ b/mc2mtlib/__init__.py
+@@ -1,4 +1,5 @@
+ from . import argument_parser
++from . import mc2mt
+ from . import minetest_world
+ from . import blob_writer
+ from . import block_functions
+diff --git a/mc2mt.py b/mc2mtlib/mc2mt.py
+old mode 100755
+new mode 100644
+similarity index 90%
+rename from mc2mt.py
+rename to mc2mtlib/mc2mt.py
+index 938600b..67affff
+--- a/mc2mt.py
++++ b/mc2mtlib/mc2mt.py
+@@ -4,10 +4,17 @@ import time
+
+ import anvil
+
+-from mc2mtlib import *
++from mc2mtlib import argument_parser
++from mc2mtlib import minetest_world
++from mc2mtlib import blob_writer
++from mc2mtlib import block_functions
++from mc2mtlib import block_conversion
++from mc2mtlib import section_conversion
++
++parse_args = argument_parser.parser.parse_args
+
+ # Main
+-if __name__ == '__main__':
++def mc2mt():
+
+ # Args
+ args = parse_args()
+diff --git a/pyproject.toml b/pyproject.toml
+new file mode 100644
+index 0000000..cf9a70d
+--- /dev/null
++++ b/pyproject.toml
+@@ -0,0 +1,11 @@
++[build-system]
++requires = ['setuptools']
++build-backend = 'setuptools.build_meta'
++
++[project]
++name = 'mc2mt'
++version = '0.1'
++dependencies = ['anvil-parser']
++
++[project.scripts]
++mc2mt = 'mc2mtlib:mc2mt.mc2mt'
+--
+2.40.1
+
--
2.40.1
A
A
Adam Faiz wrote on 1 Jul 2023 16:14
(address . 64362@debbugs.gnu.org)(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
9f2d5602-eec5-88b3-53b4-201c79032fed@disroot.org
From 2722ee387376473ee28f910f2a15c4e983be4172 Mon Sep 17 00:00:00 2001
Message-Id: <2722ee387376473ee28f910f2a15c4e983be4172.1688220784.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 30 Jun 2023 16:56:23 +0800
Subject: [PATCH v1 3/3] gnu: Add mc2mt.

* gnu/packages/game-development.scm (mc2mt): New variable.
* gnu/packages/patches/mc2mt-add-packaging-support.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
---
gnu/local.mk | 1 +
gnu/packages/game-development.scm | 32 +++++++
.../patches/mc2mt-add-packaging-support.patch | 86 +++++++++++++++++++
3 files changed, 119 insertions(+)
create mode 100644 gnu/packages/patches/mc2mt-add-packaging-support.patch

Toggle diff (158 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index b4e8fd0b42..57cae21761 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1572,6 +1572,7 @@ dist_patch_DATA = \
%D%/packages/patches/maxima-defsystem-mkdir.patch \
%D%/packages/patches/maven-generate-component-xml.patch \
%D%/packages/patches/maven-generate-javax-inject-named.patch \
+ %D%/packages/patches/mc2mt-add-packaging-support.patch \
%D%/packages/patches/mcrl2-fix-1687.patch \
%D%/packages/patches/mcrl2-fix-counterexample.patch \
%D%/packages/patches/mcrypt-CVE-2012-4409.patch \
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 503c5e1f73..bb05117714 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -56,6 +56,7 @@ (define-module (gnu packages game-development)
#:use-module (guix utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix build-system scons)
#:use-module (gnu packages)
@@ -1744,6 +1745,37 @@ (define-public ois
(home-page "https://github.com/wgois/OIS")
(license license:zlib)))
+(define-public mc2mt
+ (let ((commit "039dbc26466a430e03c646dc5a9bd0822637a87a")
+ (revision "0"))
+ (package
+ (name "mc2mt")
+ (version (git-version "0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/listia/mc2mt")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1vnaznwgm87x0n5dp14363p2h54lpzalynrrd6lbs6wgrqq7fq9i"))
+ (patches (search-patches "mc2mt-add-packaging-support.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (substitute* "mc2mtlib/argument_parser.py"
+ (("mineclone2") "mineclone"))))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-anvil-parser))
+ (arguments
+ (list #:tests? #f)) ; no tests
+ (synopsis "Minecraft to Minetest world converter")
+ (description "@code{mc2mt} is a Minecraft to Minetest world converter.
+It can convert worlds from Minecraft 1.9 and later.")
+ (home-page "https://github.com/listia/mc2mt")
+ (license license:expat))))
+
(define-public mygui
(package
(name "mygui")
diff --git a/gnu/packages/patches/mc2mt-add-packaging-support.patch b/gnu/packages/patches/mc2mt-add-packaging-support.patch
new file mode 100644
index 0000000000..8be32b79e9
--- /dev/null
+++ b/gnu/packages/patches/mc2mt-add-packaging-support.patch
@@ -0,0 +1,86 @@
+From 84ebbd6001d7cde552dd5b9da5c0528e476ab53d Mon Sep 17 00:00:00 2001
+From: AwesomeAdam54321 <adam.faiz@disroot.org>
+Date: Fri, 30 Jun 2023 22:08:46 +0800
+Subject: [PATCH] mc2mt: Add packaging support.
+
+* MANIFEST.in: Add it.
+* mc2mt.py -> mc2mtlib/mc2mt.py: Move mc2mt.py functionality here.
+* mc2mtlib/__init__.py: Import mc2mt.
+* pyproject.toml: Add project specification.
+---
+ MANIFEST.in | 1 +
+ mc2mtlib/__init__.py | 1 +
+ mc2mt.py => mc2mtlib/mc2mt.py | 11 +++++++++--
+ pyproject.toml | 11 +++++++++++
+ 4 files changed, 22 insertions(+), 2 deletions(-)
+ create mode 100644 MANIFEST.in
+ rename mc2mt.py => mc2mtlib/mc2mt.py (90%)
+ mode change 100755 => 100644
+ create mode 100644 pyproject.toml
+
+diff --git a/MANIFEST.in b/MANIFEST.in
+new file mode 100644
+index 0000000..d5914df
+--- /dev/null
++++ b/MANIFEST.in
+@@ -0,0 +1 @@
++include mc2mtlib/mods/*.json
+diff --git a/mc2mtlib/__init__.py b/mc2mtlib/__init__.py
+index 047fcf2..315b5dc 100644
+--- a/mc2mtlib/__init__.py
++++ b/mc2mtlib/__init__.py
+@@ -1,4 +1,5 @@
+ from . import argument_parser
++from . import mc2mt
+ from . import minetest_world
+ from . import blob_writer
+ from . import block_functions
+diff --git a/mc2mt.py b/mc2mtlib/mc2mt.py
+old mode 100755
+new mode 100644
+similarity index 90%
+rename from mc2mt.py
+rename to mc2mtlib/mc2mt.py
+index 938600b..67affff
+--- a/mc2mt.py
++++ b/mc2mtlib/mc2mt.py
+@@ -4,10 +4,17 @@ import time
+
+ import anvil
+
+-from mc2mtlib import *
++from mc2mtlib import argument_parser
++from mc2mtlib import minetest_world
++from mc2mtlib import blob_writer
++from mc2mtlib import block_functions
++from mc2mtlib import block_conversion
++from mc2mtlib import section_conversion
++
++parse_args = argument_parser.parser.parse_args
+
+ # Main
+-if __name__ == '__main__':
++def mc2mt():
+
+ # Args
+ args = parse_args()
+diff --git a/pyproject.toml b/pyproject.toml
+new file mode 100644
+index 0000000..cf9a70d
+--- /dev/null
++++ b/pyproject.toml
+@@ -0,0 +1,11 @@
++[build-system]
++requires = ['setuptools']
++build-backend = 'setuptools.build_meta'
++
++[project]
++name = 'mc2mt'
++version = '0.1'
++dependencies = ['anvil-parser']
++
++[project.scripts]
++mc2mt = 'mc2mtlib:mc2mt.mc2mt'
+--
+2.40.1
+

base-commit: f25529b08e356f89ca7cecc44295085531a8faba
--
2.40.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 64362@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64362
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch