mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
* gnu/packages/luanti.scm: New file. (luanti, luanti-server, luanti-topic, luanti-moreores, luanti-sound-api-core) (luanti-basic-materials, luanti-coloredwood, luanti-ethereal) (luanti-homedecor-modpack, luanti-mesecons, luanti-mineclone, luanti-mobs) (luanti-mobs-animal, luanti-mobs-monster, luanti-pipeworks, luanti-technic) (luanti-throwing, luanti-throwing-arrows, luanti-worldedit) (luanti-unifieddyes, luanti-unified-inventory, luanti-advtrains) (luanti-basic-trains, luanti-oneblock, luanti-wielded-light): New variables. * gnu/packages/minetest.scm: (minetest, minetest-server, minetest-topic, minetest-moreores) (minetest-sound-api-core, minetest-basic-materials, minetest-coloredwood) (minetest-ethereal, minetest-homedecor-modpack, minetest-mesecons) (minetest-mineclone, minetest-mobs, minetest-mobs-animal) (minetest-mobs-monster, minetest-pipeworks, minetest-technic) (minetest-throwing, minetest-throwing-arrows, minetest-worldedit) (minetest-unifieddyes, minetest-unified-inventory, minetest-advtrains) (minetest-basic-trains, minetest-oneblock, minetest-wielded-light): Deprecate in favor of the above. (minetest-game): Move to… * gnu/packages/luanti.scm (minetest-game): … here. * gnu/local.mk (GNU_SYSTEM_MODULES): Register luanti.scm. * guix/build-system/luanti.scm: New file. (luanti-mod-build-system): New public variable. * guix/build-system/minetest.scm (minetest-mod-build-system): Deprecate in favor of luanti-mod-build-system. * guix/build/luanti-build-system.scm: New file, renamed from… * guix/build/minetest-build-system.scm: … this. Deprecate in favor of luanti-build-system. * guix/import/luanti.scm: New file, renamed from guix/import/minetest.scm. (%contentdb-api): Switch to “https://content.luanti.org/api/”. (luanti-package?, latest-luanti-release, luanti->guix-package) (luanti-recursive-import, %luanti-updater): New public variables. * guix/import/minetest.scm (minetest-package?, latest-minetest-release) (minetest->guix-package, minetest-recursive-import, %minetest-updater): Deprecate in favor of the luanti variants above. * guix/scripts/import/luanti.scm: New file, renamed from guix/scripts/import/minetest.scm. (guix-import-luanti): New public variable. * guix/scripts/import/minetest.scm (guix-import-minetest): Deprecate in favor of guix-import-luanti. * tests/minetest.scm: Rename to… * tests/luanti.scm: … this. * Makefile.am (MODULES, SCM_TESTS): Adjust accordingly. * etc/teams.scm (games): Adjust accordingly. * CODEOWNERS: Adjust accordingly.
104 lines
3.8 KiB
Scheme
104 lines
3.8 KiB
Scheme
;;; GNU Guix --- Functional package management for GNU
|
||
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
||
;;; Copyright © 2025 Liliana Marie Prikler <liliana.prikler@gmail.com>
|
||
;;;
|
||
;;; This file is part of GNU Guix.
|
||
;;;
|
||
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
||
;;; under the terms of the GNU General Public License as published by
|
||
;;; the Free Software Foundation; either version 3 of the License, or (at
|
||
;;; your option) any later version.
|
||
;;;
|
||
;;; GNU Guix is distributed in the hope that it will be useful, but
|
||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
;;; GNU General Public License for more details.
|
||
;;;
|
||
;;; You should have received a copy of the GNU General Public License
|
||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
(define-module (guix build-system luanti)
|
||
#:use-module (guix build-system copy)
|
||
#:use-module (guix build-system gnu)
|
||
#:use-module (guix build-system)
|
||
#:use-module (guix utils)
|
||
#:export (luanti-mod-build-system))
|
||
|
||
;;
|
||
;; Build procedure for luanti mods. This is implemented as an extension
|
||
;; of ‘copy-build-system’.
|
||
;;
|
||
;; Code:
|
||
|
||
;; Lazily resolve the bindings to avoid circular dependencies.
|
||
(define (default-optipng)
|
||
;; Lazily resolve the binding to avoid a circular dependency.
|
||
(module-ref (resolve-interface '(gnu packages image)) 'optipng))
|
||
|
||
(define (default-luanti)
|
||
(module-ref (resolve-interface '(gnu packages luanti)) 'luanti))
|
||
|
||
(define (default-luanti-game)
|
||
(module-ref (resolve-interface '(gnu packages luanti)) 'minetest-game))
|
||
|
||
(define (default-xvfb-run)
|
||
(module-ref (resolve-interface '(gnu packages xorg)) 'xvfb-run))
|
||
|
||
(define %luanti-build-system-modules
|
||
;; Build-side modules imported by default.
|
||
`((guix build luanti-build-system)
|
||
,@%copy-build-system-modules))
|
||
|
||
(define %default-modules
|
||
;; Modules in scope in the build-side environment.
|
||
'((guix build gnu-build-system)
|
||
(guix build luanti-build-system)
|
||
(guix build utils)))
|
||
|
||
(define (standard-luanti-packages)
|
||
"Return the list of (NAME PACKAGE OUTPUT) or (NAME PACKAGE) tuples of
|
||
standard packages used as implicit inputs of the Luanti build system."
|
||
`(("xvfb-run" ,(default-xvfb-run))
|
||
("optipng" ,(default-optipng))
|
||
("luanti" ,(default-luanti))
|
||
("luanti-game" ,(default-luanti-game))
|
||
,@(filter (lambda (input)
|
||
(member (car input)
|
||
'("libc" "tar" "gzip" "bzip2" "xz" "locales")))
|
||
(standard-packages))))
|
||
|
||
(define* (lower-mod name #:key (implicit-inputs? #t) #:allow-other-keys
|
||
#:rest arguments)
|
||
(define lower (build-system-lower gnu-build-system))
|
||
(apply lower
|
||
name
|
||
(substitute-keyword-arguments arguments
|
||
;; luanti-mod-build-system adds implicit inputs by itself,
|
||
;; so don't let gnu-build-system add its own implicit inputs
|
||
;; as well.
|
||
((#:implicit-inputs? implicit-inputs? #t)
|
||
#f)
|
||
((#:implicit-cross-inputs? implicit-cross-inputs? #t)
|
||
#f)
|
||
((#:imported-modules imported-modules %luanti-build-system-modules)
|
||
imported-modules)
|
||
((#:modules modules %default-modules)
|
||
modules)
|
||
((#:phases phases '%standard-phases)
|
||
phases)
|
||
;; Ensure nothing sneaks into the closure.
|
||
((#:allowed-references allowed-references '())
|
||
allowed-references)
|
||
;; Add the implicit inputs.
|
||
((#:native-inputs native-inputs '())
|
||
(if implicit-inputs?
|
||
(append native-inputs (standard-luanti-packages))
|
||
native-inputs)))))
|
||
|
||
(define luanti-mod-build-system
|
||
(build-system
|
||
(name 'luanti-mod)
|
||
(description "The build system for Luanti mods")
|
||
(lower lower-mod)))
|
||
|
||
;;; luanti.scm ends here
|