From 3df485152c545dc365c757368863c6f80815d9ec Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Tue, 10 Aug 2021 17:07:18 +0200 Subject: build-system: Add 'minetest-mod-build-system'. * guix/build-system/minetest.scm: New module. * guix/build/minetest-build-system.scm: Likewise. * Makefile.am (MODULES): Add them. * doc/guix.texi (Build Systems): Document 'minetest-mod-build-system'. Signed-off-by: Leo Prikler --- guix/build-system/minetest.scm | 99 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 guix/build-system/minetest.scm (limited to 'guix/build-system') diff --git a/guix/build-system/minetest.scm b/guix/build-system/minetest.scm new file mode 100644 index 0000000000..f33e97559d --- /dev/null +++ b/guix/build-system/minetest.scm @@ -0,0 +1,99 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Maxime Devos +;;; +;;; 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 . + +(define-module (guix build-system minetest) + #:use-module (guix build-system copy) + #:use-module (guix build-system gnu) + #:use-module (guix build-system) + #:use-module (guix utils) + #:export (minetest-mod-build-system)) + +;; +;; Build procedure for minetest 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-minetest) + (module-ref (resolve-interface '(gnu packages games)) 'minetest)) + +(define (default-xvfb-run) + (module-ref (resolve-interface '(gnu packages xorg)) 'xvfb-run)) + +(define %minetest-build-system-modules + ;; Build-side modules imported by default. + `((guix build minetest-build-system) + ,@%copy-build-system-modules)) + +(define %default-modules + ;; Modules in scope in the build-side environment. + '((guix build gnu-build-system) + (guix build minetest-build-system) + (guix build utils))) + +(define (standard-minetest-packages) + "Return the list of (NAME PACKAGE OUTPUT) or (NAME PACKAGE) tuples of +standard packages used as implicit inputs of the Minetest build system." + `(("xvfb-run" ,(default-xvfb-run)) + ("optipng" ,(default-optipng)) + ("minetest" ,(default-minetest)) + ,@(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 + ;; minetest-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 %minetest-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-minetest-packages)) + native-inputs))))) + +(define minetest-mod-build-system + (build-system + (name 'minetest-mod) + (description "The build system for minetest mods") + (lower lower-mod))) + +;;; minetest.scm ends here -- cgit v1.2.3 From b7d1698f7fb1f4119d29951d0059b26770e2a853 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Fri, 20 Aug 2021 13:34:59 +0200 Subject: gnu: minetest: move to minetest.scm. * gnu/packages/games.scm (minetest, minetest-data): Move from here... * gnu/packages/minetest.scm (minetest, minetest-data): ... to here. * guix/build-system/minetest.scm (default-minetest): Adjust accordingly. --- gnu/packages/games.scm | 137 +---------------------------------- gnu/packages/minetest.scm | 161 +++++++++++++++++++++++++++++++++++++++++ guix/build-system/minetest.scm | 2 +- 3 files changed, 164 insertions(+), 136 deletions(-) (limited to 'guix/build-system') diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index fbf43b9b10..0249662d23 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 John Darrington ;;; Copyright © 2013 Nikita Karetnikov -;;; Copyright © 2014, 2016 David Thompson +;;; Copyright © 2014, 2015 David Thompson ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Eric Bavier ;;; Copyright © 2014 Cyrill Schenkel ;;; Copyright © 2014 Sylvain Beucler @@ -52,7 +52,7 @@ ;;; Copyright © 2020 Jack Hill ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020, 2021 Michael Rohleder -;;; Copyright © 2020, 2021 Trevor Hass +;;; Copyright © 2020 Trevor Hass ;;; Copyright © 2020, 2021 Leo Prikler ;;; Copyright © 2020 Lu hux ;;; Copyright © 2020 Tomás Ortín Fernández @@ -3582,139 +3582,6 @@ enemies in different game modes such as space ball, death match, team death match, cannon keep, and grave-itation pit.") (license license:gpl3+)))) -(define-public minetest - (package - (name "minetest") - (version "5.4.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/minetest/minetest") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "062ilb7s377q3hwfhl8q06vvcw2raydz5ljzlzwy2dmyzmdcndb8")) - (modules '((guix build utils))) - (patches - (search-patches - "minetest-add-MINETEST_MOD_PATH.patch")) - (snippet - '(begin - ;; Delete bundled libraries. - (delete-file-recursively "lib") - #t)))) - (build-system cmake-build-system) - (arguments - `(#:configure-flags - (list "-DRUN_IN_PLACE=0" - "-DENABLE_FREETYPE=1" - "-DENABLE_GETTEXT=1" - "-DENABLE_SYSTEM_JSONCPP=TRUE" - (string-append "-DIRRLICHT_INCLUDE_DIR=" - (assoc-ref %build-inputs "irrlicht") - "/include/irrlicht") - (string-append "-DCURL_INCLUDE_DIR=" - (assoc-ref %build-inputs "curl") - "/include/curl")) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-sources - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "src/filesys.cpp" - ;; Use store-path for "rm" instead of non-existing FHS path. - (("\"/bin/rm\"") - (string-append "\"" (assoc-ref inputs "coreutils") "/bin/rm\""))) - (substitute* "src/CMakeLists.txt" - ;; Let minetest binary remain in build directory. - (("set\\(EXECUTABLE_OUTPUT_PATH .*\\)") "")) - (substitute* "src/unittest/test_servermodmanager.cpp" - ;; do no override MINETEST_SUBGAME_PATH - (("(un)?setenv\\(\"MINETEST_SUBGAME_PATH\".*\\);") - "(void)0;")) - (setenv "MINETEST_SUBGAME_PATH" - (string-append (getcwd) "/games")) ; for check - #t)) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - ;; Thanks to our substitutions, the tests should also run - ;; when invoked on the target outside of `guix build'. - (when tests? - (setenv "HOME" "/tmp") - (invoke "src/minetest" "--run-unittests"))))))) - (native-search-paths - (list (search-path-specification - (variable "MINETEST_SUBGAME_PATH") - (files '("share/minetest/games"))) - (search-path-specification - (variable "MINETEST_MOD_PATH") - (files '("share/minetest/mods"))))) - (native-inputs - `(("pkg-config" ,pkg-config))) - (inputs - `(("coreutils" ,coreutils) - ("curl" ,curl) - ("freetype" ,freetype) - ("gettext" ,gettext-minimal) - ("gmp" ,gmp) - ("irrlicht" ,irrlicht) - ("jsoncpp" ,jsoncpp) - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libogg" ,libogg) - ("libvorbis" ,libvorbis) - ("libxxf86vm" ,libxxf86vm) - ("luajit" ,luajit) - ("mesa" ,mesa) - ("ncurses" ,ncurses) - ("openal" ,openal) - ("sqlite" ,sqlite))) - (propagated-inputs - `(("minetest-data" ,minetest-data))) - (synopsis "Infinite-world block sandbox game") - (description - "Minetest is a sandbox construction game. Players can create and destroy -various types of blocks in a three-dimensional open world. This allows -forming structures in every possible creation, on multiplayer servers or as a -single player. Mods and texture packs allow players to personalize the game -in different ways.") - (home-page "https://www.minetest.net/") - (license license:lgpl2.1+))) - -(define minetest-data - (package - (name "minetest-data") - (version (package-version minetest)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/minetest/minetest_game") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0i45lbnikvgj9kxdp0yphpjjwjcgp4ibn49xkj78j5ic1s9n8jd4")))) - (build-system trivial-build-system) - (native-inputs - `(("source" ,source))) - (arguments - `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils)) - (let ((install-dir (string-append - %output - "/share/minetest/games/minetest_game"))) - (mkdir-p install-dir) - (copy-recursively - (assoc-ref %build-inputs "source") - install-dir) - #t)))) - (synopsis "Main game data for the Minetest game engine") - (description - "Game data for the Minetest infinite-world block sandbox game.") - (home-page "https://www.minetest.net/") - (license license:lgpl2.1+))) - (define glkterm (package (name "glkterm") diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm index 0cb31808c9..5453f4d16a 100644 --- a/gnu/packages/minetest.scm +++ b/gnu/packages/minetest.scm @@ -1,3 +1,12 @@ +;;; Copyright © 2014, 2015, 2016 David Thompson +;;; Copyright © 2015 Andreas Enge +;;; Copyright © 2018 Efraim Flashner +;;; Copyright © 2015, 2019 Mark H Weaver +;;; Copyright © 2016, 2017, 2018, 2019 Kei Kebreau +;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2019–2021 Tobias Geerinckx-Rice +;;; Copyright © 2021 Trevor Hass +;;; Copyright © 2020, 2021 Leo Prikler ;;; Copyright © 2021 Maxime Devos ;;; This file is part of GNU Guix. ;;; @@ -14,12 +23,164 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages minetest) + #:use-module (gnu packages) + #:use-module (gnu packages audio) + #:use-module (gnu packages base) + #:use-module (gnu packages curl) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages games) + #:use-module (gnu packages gettext) + #:use-module (gnu packages gl) + #:use-module (gnu packages image) + #:use-module (gnu packages lua) + #:use-module (gnu packages multiprecision) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages serialization) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) #:use-module (guix packages) #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (guix build-system copy) + #:use-module (guix build-system trivial) #:use-module (guix build-system minetest) #:use-module ((guix licenses) #:prefix license:)) +(define-public minetest + (package + (name "minetest") + (version "5.4.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/minetest/minetest") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "062ilb7s377q3hwfhl8q06vvcw2raydz5ljzlzwy2dmyzmdcndb8")) + (modules '((guix build utils))) + (patches + (search-patches + "minetest-add-MINETEST_MOD_PATH.patch")) + (snippet + '(begin + ;; Delete bundled libraries. + (delete-file-recursively "lib") + #t)))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list "-DRUN_IN_PLACE=0" + "-DENABLE_FREETYPE=1" + "-DENABLE_GETTEXT=1" + "-DENABLE_SYSTEM_JSONCPP=TRUE" + (string-append "-DIRRLICHT_INCLUDE_DIR=" + (assoc-ref %build-inputs "irrlicht") + "/include/irrlicht") + (string-append "-DCURL_INCLUDE_DIR=" + (assoc-ref %build-inputs "curl") + "/include/curl")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-sources + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/filesys.cpp" + ;; Use store-path for "rm" instead of non-existing FHS path. + (("\"/bin/rm\"") + (string-append "\"" (assoc-ref inputs "coreutils") "/bin/rm\""))) + (substitute* "src/CMakeLists.txt" + ;; Let minetest binary remain in build directory. + (("set\\(EXECUTABLE_OUTPUT_PATH .*\\)") "")) + (substitute* "src/unittest/test_servermodmanager.cpp" + ;; do no override MINETEST_SUBGAME_PATH + (("(un)?setenv\\(\"MINETEST_SUBGAME_PATH\".*\\);") + "(void)0;")) + (setenv "MINETEST_SUBGAME_PATH" + (string-append (getcwd) "/games")) ; for check + #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + ;; Thanks to our substitutions, the tests should also run + ;; when invoked on the target outside of `guix build'. + (when tests? + (setenv "HOME" "/tmp") + (invoke "src/minetest" "--run-unittests"))))))) + (native-search-paths + (list (search-path-specification + (variable "MINETEST_SUBGAME_PATH") + (files '("share/minetest/games"))) + (search-path-specification + (variable "MINETEST_MOD_PATH") + (files '("share/minetest/mods"))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("coreutils" ,coreutils) + ("curl" ,curl) + ("freetype" ,freetype) + ("gettext" ,gettext-minimal) + ("gmp" ,gmp) + ("irrlicht" ,irrlicht) + ("jsoncpp" ,jsoncpp) + ("libjpeg" ,libjpeg-turbo) + ("libpng" ,libpng) + ("libogg" ,libogg) + ("libvorbis" ,libvorbis) + ("libxxf86vm" ,libxxf86vm) + ("luajit" ,luajit) + ("mesa" ,mesa) + ("ncurses" ,ncurses) + ("openal" ,openal) + ("sqlite" ,sqlite))) + (propagated-inputs + `(("minetest-data" ,minetest-data))) + (synopsis "Infinite-world block sandbox game") + (description + "Minetest is a sandbox construction game. Players can create and destroy +various types of blocks in a three-dimensional open world. This allows +forming structures in every possible creation, on multiplayer servers or as a +single player. Mods and texture packs allow players to personalize the game +in different ways.") + (home-page "https://www.minetest.net/") + (license license:lgpl2.1+))) + +(define minetest-data + (package + (name "minetest-data") + (version (package-version minetest)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/minetest/minetest_game") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0i45lbnikvgj9kxdp0yphpjjwjcgp4ibn49xkj78j5ic1s9n8jd4")))) + (build-system trivial-build-system) + (native-inputs + `(("source" ,source))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((install-dir (string-append + %output + "/share/minetest/games/minetest_game"))) + (mkdir-p install-dir) + (copy-recursively + (assoc-ref %build-inputs "source") + install-dir) + #t)))) + (synopsis "Main game data for the Minetest game engine") + (description + "Game data for the Minetest infinite-world block sandbox game.") + (home-page "https://www.minetest.net/") + (license license:lgpl2.1+))) + (define-public (minetest-topic topic-id) "Return an URL (as a string) pointing to the forum topic with numeric identifier TOPIC-ID on the official Minetest forums." diff --git a/guix/build-system/minetest.scm b/guix/build-system/minetest.scm index f33e97559d..1fae3a47e9 100644 --- a/guix/build-system/minetest.scm +++ b/guix/build-system/minetest.scm @@ -35,7 +35,7 @@ (module-ref (resolve-interface '(gnu packages image)) 'optipng)) (define (default-minetest) - (module-ref (resolve-interface '(gnu packages games)) 'minetest)) + (module-ref (resolve-interface '(gnu packages minetest)) 'minetest)) (define (default-xvfb-run) (module-ref (resolve-interface '(gnu packages xorg)) 'xvfb-run)) -- cgit v1.2.3 From 33a1ec29fa0ad72c61cef13c8af08c847eb399c1 Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Mon, 9 Aug 2021 07:19:03 +0000 Subject: guix: dune-build-system: Add a profile parameter. * guix/build-system/dune.scm: Add a profile parameter. * guix/build/dune-build-system.scm (build): Use it. * doc/guix.texi: Document it. * gnu/packages/ocaml.scm: Remove profile being set from build flags. Signed-off-by: Julien Lepiller --- doc/guix.texi | 7 +++++++ gnu/packages/ocaml.scm | 17 ++++++----------- guix/build-system/dune.scm | 3 +++ guix/build/dune-build-system.scm | 8 ++++++-- 4 files changed, 22 insertions(+), 13 deletions(-) (limited to 'guix/build-system') diff --git a/doc/guix.texi b/doc/guix.texi index 241a1824ec..949d6d4092 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@* Copyright @copyright{} 2021 Raghav Gururajan@* Copyright @copyright{} 2021 Domagoj Stolfa@* Copyright @copyright{} 2021 Hui Lu@* +Copyright @copyright{} 2021 pukkamustard@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -7731,6 +7732,12 @@ The @code{#:package} parameter can be passed to specify a package name, which is useful when a package contains multiple packages and you want to build only one of them. This is equivalent to passing the @code{-p} argument to @code{dune}. + +The @code{#:profile} parameter can be passed to specify the +@uref{https://dune.readthedocs.io/en/stable/dune-files.html#profile, +dune build profile}. This is equivalent to passing the @code{--profile} +argument to @code{dune}. Its default value is @code{"release"}. + @end defvr @defvr {Scheme Variable} go-build-system diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index bdd52d2940..fee9e5e0ee 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2876,8 +2876,7 @@ without a complete in-memory representation of the data.") "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3")))) (build-system dune-build-system) (arguments - `(#:test-target "tests" - #:build-flags (list "--profile=release"))) + `(#:test-target "tests")) (propagated-inputs `(("ocaml-cmdliner" ,ocaml-cmdliner))) (home-page "https://www.typerex.org/ocp-indent.html") @@ -3295,8 +3294,7 @@ build system and allows external tools to analyse your project easily.") "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs")))) (build-system dune-build-system) (arguments - `(#:tests? #f - #:build-flags (list "--profile" "release"))) + `(#:tests? #f)) (native-inputs `(("ocamlbuild" ,ocamlbuild))) (home-page "https://github.com/mjambon/cppo") @@ -3364,8 +3362,7 @@ standard iterator type starting from 4.07.") (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss")))) (build-system dune-build-system) (arguments - `(#:tests? #f - #:build-flags (list "--profile" "release"))) + `(#:tests? #f)) (propagated-inputs `(("ocaml-seq" ,ocaml-seq))) (native-inputs @@ -3842,9 +3839,8 @@ the plugins facilitate extensibility, and the frontends serve as entry points.") "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h")))) (build-system dune-build-system) (arguments - `(#:build-flags (list "--profile" "release") - #:test-target "camomile-test" - #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82 + `(#:test-target "camomile-test" + #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82 #:phases (modify-phases %standard-phases (add-before 'build 'fix-usr-share @@ -3935,8 +3931,7 @@ connect an engine to your inputs and rendering functions to get an editor.") (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy")))) (build-system dune-build-system) (arguments - `(#:build-flags (list "--profile" "release") - #:tests? #f + `(#:tests? #f #:ocaml ,ocaml-4.07 #:findlib ,ocaml4.07-findlib #:dune ,ocaml4.07-dune)) diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index 6a2f3d16de..1a64cf9b75 100644 --- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018 Julien Lepiller ;;; Copyright © 2017 Ben Woodcroft +;;; Copyright © 2021 pukkamustard ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,6 +89,7 @@ (out-of-source? #t) (jbuild? #f) (package #f) + (profile "release") (tests? #t) (test-flags ''()) (test-target "test") @@ -127,6 +129,7 @@ provides a 'setup.ml' file as its build system." #:out-of-source? ,out-of-source? #:jbuild? ,jbuild? #:package ,package + #:profile ,profile #:tests? ,tests? #:test-target ,test-target #:install-target ,install-target diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm index 7e2ec1e3e1..6a0c2593ac 100644 --- a/guix/build/dune-build-system.scm +++ b/guix/build/dune-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Julien Lepiller ;;; Copyright © 2019 Gabriel Hondet +;;; Copyright © 2021 pukkamustard ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,11 +32,14 @@ ;; Code: (define* (build #:key (build-flags '()) (jbuild? #f) - (use-make? #f) (package #f) #:allow-other-keys) + (use-make? #f) (package #f) + (profile "release") #:allow-other-keys) "Build the given package." (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "build" "@install" - (append (if package (list "-p" package) '()) build-flags))) + (append (if package (list "-p" package) '()) + `("--profile" ,profile) + build-flags))) #t) (define* (check #:key (test-flags '()) (test-target "test") tests? -- cgit v1.2.3 From 0508622848f65795d71c4dc860e0151291bff044 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Thu, 12 Aug 2021 09:17:20 +0200 Subject: build-system: chicken: Add 'egg-uri' procedure. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Once Chicken 6 gets released, we can just adjust the URL in the ‘egg-uri’ procedure, instead of having to change the URL for all the Chicken packages. Making things a little more future-proof. * guix/build-system/chicken.scm (egg-uri): New procedure. * guix/import/egg.scm (egg-source-url): Adjust accordingly. (egg->guix-package): Likewise. Signed-off-by: Ludovic Courtès --- guix/build-system/chicken.scm | 10 +++++++++- guix/import/egg.scm | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'guix/build-system') diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9abae0431a..10f1469e88 100644 --- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 raingloom +;;; Copyright © 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,7 +27,14 @@ #:use-module (ice-9 match) #:export (%chicken-build-system-modules chicken-build - chicken-build-system)) + chicken-build-system + egg-uri)) + +(define* (egg-uri name version #:optional (extension ".tar.gz")) + "Return a URI string for the CHICKEN egg corresponding to NAME and VERSION. +EXTENSION is the file name extension, such as '.tar.gz'." + (string-append "https://code.call-cc.org/egg-tarballs/5/" + name "/" name "-" version extension)) (define %chicken-build-system-modules ;; Build-side modules imported and used by default. diff --git a/guix/import/egg.scm b/guix/import/egg.scm index 107894ddcf..89e7a9160d 100644 --- a/guix/import/egg.scm +++ b/guix/import/egg.scm @@ -87,7 +87,7 @@ (define (egg-source-url name version) "Return the URL to the source tarball for version VERSION of the CHICKEN egg NAME." - (string-append (%eggs-url) "/" name "/" name "-" version ".tar.gz")) + `(egg-uri ,name version)) (define (egg-name->guix-name name) "Return the package name for CHICKEN egg NAME." @@ -197,7 +197,8 @@ not work." (tarball (if source #f (with-store store - (download-to-store store source-url))))) + (download-to-store + store (egg-uri name version)))))) (define egg-home-page (string-append (%eggs-home-page) "/" name)) -- cgit v1.2.3