[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49828] [PATCH 05/20] build-system: minetest: Don't retain reference
From: |
Leo Prikler |
Subject: |
[bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal". |
Date: |
Thu, 05 Aug 2021 14:04:07 +0200 |
User-agent: |
Evolution 3.34.2 |
Hi,
Am Donnerstag, den 05.08.2021, 13:01 +0200 schrieb Maxime Devos:
> Hi,
>
> The attached patch squashes "PATCH 04" and "PATCH 05" together
> and extends the build system. It now has an install plan only
> installing
> what's necessary (Lua code, PNG images, some configuration files
> ...),
> a 'check' build phase verifying Minetest can actually load the mod,
> and a 'minimise-png' phase minimising PNG images.
>
> The mod name for ‘(("." "share/minetest/mods/the-mod-name"))’ can now
> be determined exactly in most cases (Minetest doesn't really care but
> the directory name can appear in the GUI in some cases).
>
> Greetings,
> Maxime.
> +mods, which consists of copying lua code, images and other resources
> to
s/lua/Lua/ :)
> +(define* (install #:key inputs #:allow-other-keys #:rest arguments)
> + (apply (@@ (guix build copy-build-system) install)
> + #:install-plan (mod-install-plan (apply guess-mod-name
> arguments))
> + arguments))
@@ is a code smell, as far as Guix is concerned. Rather import copy-
build-system with the copy: prefix.
> +(define png-file?
> + ((@@ (guix build utils) file-header-match) %png-magic-bytes))
Likewise import (guix build utils) directly.
> +(define (lower-mod name . arguments)
> + (define lower (build-system-lower gnu-build-system))
> + (apply lower
> + name
> + #:imported-modules %minetest-build-system-modules
> + #:modules %default-modules
> + #:phases '%standard-phases
> + #:implicit-inputs? #f
> + ;; Mods are architecture-independent.
> + #:target #f
> + ;; Ensure nothing sneaks into the closure.
> + #:allowed-references '()
> + (substitute-keyword-arguments arguments
> + ((#:native-inputs native-inputs '())
> + (append native-inputs (standard-minetest-packages))))))
This appears a little confusing. On first glance, it does not seem to
allow overriding e.g. #:phases, but on a second look using `apply'
together with shallowly substituted arguments would enable that. The
only thing that's missing imo is that #:implicit-inputs? is not
honoured for (standard-minetest-packages) -- I think you might want to
rectify that.
Otherwise looks pretty good to me.
- [bug#49828] [PATCH 02/20] gnu: minetest: Search for mods in MINETEST_MOD_PATH., (continued)
[bug#49828] [PATCH 04/20] build-system: Add 'minetest-mod-build-system'., Maxime Devos, 2021/08/02
[bug#49828] [PATCH 03/20] gnu: minetest: New package module., Maxime Devos, 2021/08/02
[bug#49828] [PATCH 09/20] gnu: Add minetest-unifieddyes., Maxime Devos, 2021/08/02
[bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal"., Maxime Devos, 2021/08/02
- [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal"., Leo Prikler, 2021/08/03
- [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal"., Maxime Devos, 2021/08/03
- [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal"., Leo Prikler, 2021/08/03
- [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal"., Maxime Devos, 2021/08/05
- [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal".,
Leo Prikler <=
- [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal"., Maxime Devos, 2021/08/05
- [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal"., Leo Prikler, 2021/08/05
- [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal"., Maxime Devos, 2021/08/05
- [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal"., Leo Prikler, 2021/08/05
[bug#49828] [PATCH 07/20] gnu: Add minetest-mesecons., Maxime Devos, 2021/08/02
[bug#49828] [PATCH 13/20] gnu: Add minetest-technic., Maxime Devos, 2021/08/02
[bug#49828] [PATCH 11/20] gnu: Add minetest-coloredwood., Maxime Devos, 2021/08/02
[bug#49828] [PATCH 14/20] gnu: Add minetest-throwing., Maxime Devos, 2021/08/02
[bug#49828] [PATCH 16/20] gnu: Add minetest-unified-inventory., Maxime Devos, 2021/08/02
[bug#49828] [PATCH 20/20] gnu: Add minetest-homedecor-modpack., Maxime Devos, 2021/08/02