[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20/29: build-system: Use 'sexp->gexp' for plain sexps.
From: |
guix-commits |
Subject: |
20/29: build-system: Use 'sexp->gexp' for plain sexps. |
Date: |
Mon, 8 Mar 2021 06:24:53 -0500 (EST) |
civodul pushed a commit to branch wip-build-systems-gexp
in repository guix.
commit 0b8752d4a179fc28020f2d9471c18e332d1c2bf4
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Feb 28 21:30:50 2021 +0100
build-system: Use 'sexp->gexp' for plain sexps.
This reduces memory allocations and list traversals during 'gexp->sexp',
'gexp-inputs', etc.
* guix/build-system/cargo.scm (cargo-build): Use 'sexp->gexp' for sexps
known to not contain file-like objects. Change default #:phases to a
symbol.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build): Likewise.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise.
* guix/build-system/gnu.scm (%strip-flags, %strip-directories): New
variables.
(gnu-build): Use them. Use 'sexp->gexp' where appropriate.
(gnu-cross-build): Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/ruby.scm (ruby-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/trivial.scm (trivial-build): Likewise.
* guix/build-system/waf.scm (waf-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* guix/packages.scm (patch-and-repack): Use 'sexp->gexp' when SNIPPET is
a pair.
* guix/svn-download.scm (svn-multi-fetch): Use 'sexp->gexp' for
'svn-multi-reference-locations'.
---
guix/build-system/android-ndk.scm | 10 +++----
guix/build-system/ant.scm | 10 +++----
guix/build-system/asdf.scm | 20 +++++++-------
guix/build-system/cargo.scm | 20 +++++++-------
guix/build-system/chicken.scm | 10 +++----
guix/build-system/clojure.scm | 7 ++---
guix/build-system/cmake.scm | 25 ++++++++++--------
guix/build-system/copy.scm | 17 +++++++-----
guix/build-system/dub.scm | 10 +++----
guix/build-system/emacs.scm | 10 +++----
guix/build-system/font.scm | 12 +++++----
guix/build-system/glib-or-gtk.scm | 16 +++++++-----
guix/build-system/gnu.scm | 53 +++++++++++++++++++++++---------------
guix/build-system/go.scm | 8 +++---
guix/build-system/haskell.scm | 10 +++----
guix/build-system/julia.scm | 10 +++----
guix/build-system/linux-module.scm | 20 +++++++-------
guix/build-system/maven.scm | 14 +++++-----
guix/build-system/meson.scm | 31 ++++++++++++----------
guix/build-system/minify.scm | 10 +++----
guix/build-system/node.scm | 10 +++----
guix/build-system/perl.scm | 13 ++++++----
guix/build-system/python.scm | 14 +++++-----
guix/build-system/qt.scm | 20 +++++++-------
guix/build-system/r.scm | 10 +++----
guix/build-system/rakudo.scm | 10 +++----
guix/build-system/renpy.scm | 10 +++----
guix/build-system/ruby.scm | 14 +++++-----
guix/build-system/scons.scm | 20 +++++++-------
guix/build-system/texlive.scm | 36 +++++++++++++-------------
guix/build-system/trivial.scm | 10 +++++--
guix/build-system/waf.scm | 12 ++++-----
guix/packages.scm | 4 ++-
guix/svn-download.scm | 4 +--
34 files changed, 279 insertions(+), 231 deletions(-)
diff --git a/guix/build-system/android-ndk.scm
b/guix/build-system/android-ndk.scm
index d8896e2..4173590 100644
--- a/guix/build-system/android-ndk.scm
+++ b/guix/build-system/android-ndk.scm
@@ -41,8 +41,7 @@
source
(tests? #t)
(test-target #f)
- (phases '(@ (guix build android-ndk-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(make-flags #~'())
(search-paths '())
@@ -55,7 +54,7 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(android-ndk-build #:name #$name
#:source #+source
@@ -70,8 +69,9 @@
"/share/android/build/core/main.mk")
#$make-flags)
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
+ #:search-paths '(sexp->gexp
+ #$(map
search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm
index cb48c42..08a4c99 100644
--- a/guix/build-system/ant.scm
+++ b/guix/build-system/ant.scm
@@ -110,8 +110,7 @@
(test-exclude (list "**/Abstract*.java"))
(source-dir "src")
(test-dir "src/test")
- (phases '(@ (guix build ant-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -124,7 +123,7 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(ant-build #:name #$name
#:source #+source
#:make-flags #$make-flags
@@ -141,8 +140,9 @@
#:test-dir #$test-dir
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index 5f01d7c..7bf2f97 100644
--- a/guix/build-system/asdf.scm
+++ b/guix/build-system/asdf.scm
@@ -96,8 +96,7 @@
(define* (asdf-build/source name inputs
#:key source outputs
- (phases '(@ (guix build asdf-build-system)
- %standard-phases/source))
+ (phases '%standard-phases/source)
(search-paths '())
(system (%current-system))
(guile #f)
@@ -106,14 +105,15 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(asdf-build/source #:name #$name
#:source #+source
#:system #$system
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
@@ -272,8 +272,7 @@ set up using CL source package conventions."
(asd-files ''())
(asd-systems ''())
(test-asd-file #f)
- (phases '(@ (guix build asdf-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(search-paths '())
(system (%current-system))
(guile #f)
@@ -295,7 +294,7 @@ set up using CL source package conventions."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(parameterize ((%lisp (string-append
(assoc-ref %build-inputs #$lisp-type)
"/bin/" #$lisp-type))
@@ -309,8 +308,9 @@ set up using CL source package conventions."
#:tests? #$tests?
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs))))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index 3e968a6..82fcdac 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -81,8 +81,7 @@ to NAME and VERSION."
(cargo-test-flags ''("--release"))
(features ''())
(skip-build? #f)
- (phases '(@ (guix build cargo-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -95,19 +94,21 @@ to NAME and VERSION."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(cargo-build #:name #$name
#:source #+source
#:system #$system
#:test-target #$test-target
#:vendor-dir #$vendor-dir
- #:cargo-build-flags #$cargo-build-flags
- #:cargo-test-flags #$cargo-test-flags
- #:features #$features
+ #:cargo-build-flags #$(sexp->gexp cargo-build-flags)
+ #:cargo-test-flags #$(sexp->gexp cargo-test-flags)
+ #:features #$(sexp->gexp features)
#:skip-build? #$skip-build?
#:tests? #$(and tests? (not skip-build?))
- #:phases #$phases
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
#:outputs (list #$@(map (lambda (name)
#~(cons #$name
(ungexp output name)))
@@ -115,8 +116,9 @@ to NAME and VERSION."
#:inputs (map (lambda (tuple)
(apply cons tuple))
'#$inputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)))))
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))))))
(gexp->derivation name builder
#:system system
diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm
index 0989e7a..c697826 100644
--- a/guix/build-system/chicken.scm
+++ b/guix/build-system/chicken.scm
@@ -75,8 +75,7 @@
(define* (chicken-build name inputs
#:key
source
- (phases '(@ (guix build chicken-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(egg-name "")
@@ -92,14 +91,15 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(chicken-build #:name #$name
#:source #+source
#:system #$system
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:egg-name #$egg-name
#:unpack-path #$unpack-path
#:build-flags #$build-flags
diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm
index e2ad67e..39b7f44 100644
--- a/guix/build-system/clojure.scm
+++ b/guix/build-system/clojure.scm
@@ -137,7 +137,7 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(clojure-build #:name #$name
#:source #+source
@@ -162,8 +162,9 @@
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-spec->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-spec->sexp
+ search-paths))
#:system #$system
#:inputs #$(input-tuples->gexp inputs)))))
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index f9ac2be..4e58bf7 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -113,8 +113,7 @@
(strip-flags ''("--strip-debug"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build cmake-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(system (%current-system))
(substitutable? #t)
(imported-modules %cmake-build-system-modules)
@@ -125,17 +124,22 @@ provides a 'CMakeLists.txt' file as its build system."
(define build
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
#$(with-build-variables inputs outputs
#~(cmake-build #:source #+source
#:system #$system
#:outputs %outputs
#:inputs %build-inputs
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
- #:phases #$phases
- #:configure-flags #$configure-flags
+ #:search-paths '(sexp->gexp
+ #$(map
search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:configure-flags #$(if (pair? configure-flags)
+ (sexp->gexp
configure-flags)
+ configure-flags)
#:make-flags #$make-flags
#:out-of-source? #$out-of-source?
#:build-type #$build-type
@@ -146,8 +150,8 @@ provides a 'CMakeLists.txt' file as its build system."
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$strip-flags
- #:strip-directories #$strip-directories)))))
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories #$(sexp->gexp
strip-directories))))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
@@ -184,8 +188,7 @@ provides a 'CMakeLists.txt' file as its build system."
"--enable-deterministic-archives"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build cmake-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(substitutable? #t)
(system (%current-system))
(build (nix-system->gnu-triplet system))
diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
index 8dea0b4..4894ba4 100644
--- a/guix/build-system/copy.scm
+++ b/guix/build-system/copy.scm
@@ -108,16 +108,21 @@
#:system #$system
#:outputs %outputs
#:inputs %build-inputs
- #:install-plan #$install-plan
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
- #:phases #$phases
+ #:install-plan #$(if (pair? install-plan)
+ (sexp->gexp install-plan)
+ install-plan)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
#:out-of-source? #$out-of-source?
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$strip-flags
- #:strip-directories #$strip-directories)))))
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories #$(sexp->gexp
strip-directories))))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm
index 58a72fe..55ad7de 100644
--- a/guix/build-system/dub.scm
+++ b/guix/build-system/dub.scm
@@ -63,8 +63,7 @@
(tests? #t)
(test-target #f)
(dub-build-flags ''())
- (phases '(@ (guix build dub-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -76,7 +75,7 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(dub-build #:name #$name
#:source #+source
#:system #$system
@@ -85,8 +84,9 @@
#:tests? #$tests?
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 0a8f828..3df6878 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -87,8 +87,7 @@
(tests? #f)
(parallel-tests? #t)
(test-command ''("make" "check"))
- (phases '(@ (guix build emacs-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(include (quote %default-include))
(exclude (quote %default-exclude))
@@ -103,7 +102,7 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(emacs-build #:name #$name
#:source #+source
#:system #$system
@@ -114,8 +113,9 @@
#:outputs #$(outputs->gexp outputs)
#:include #$include
#:exclude #$exclude
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index e7160ff..74dc80b 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -77,8 +77,7 @@
(tests? #t)
(test-target "test")
(configure-flags ''())
- (phases '(@ (guix build font-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -99,10 +98,13 @@
#:system #$system
#:test-target #$test-target
#:tests? #$tests?
- #:phases #$phases
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
#:outputs %outputs
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:inputs %build-inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/glib-or-gtk.scm
b/guix/build-system/glib-or-gtk.scm
index 6c09b5a..2df49a2 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -137,16 +137,19 @@
(define build
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
#$(with-build-variables inputs outputs
#~(glib-or-gtk-build #:source #+source
#:system #$system
#:outputs %outputs
#:inputs %build-inputs
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
- #:phases #$phases
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
#:glib-or-gtk-wrap-excluded-outputs
#$glib-or-gtk-wrap-excluded-outputs
#:configure-flags #$configure-flags
@@ -159,8 +162,9 @@
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$strip-flags
- #:strip-directories #$strip-directories)))))
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories
+ #$(sexp->gexp strip-directories))))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 613deb7..3fb1a24 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -330,6 +330,12 @@ standard packages used as implicit inputs of the GNU build
system."
;; Typical names of Autotools "bootstrap" scripts.
'("bootstrap" "bootstrap.sh" "autogen.sh"))
+(define %strip-flags
+ #~'("--strip-unneeded" "--enable-deterministic-archives"))
+
+(define %strip-directories
+ #~'("lib" "lib64" "libexec" "bin" "sbin"))
+
(define* (gnu-build name inputs
#:key
guile source
@@ -345,10 +351,8 @@ standard packages used as implicit inputs of the GNU build
system."
(parallel-tests? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-unneeded"
- "--enable-deterministic-archives"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(validate-runpath? #t)
(make-dynamic-linker-cache? #t)
(license-file-regexp %license-file-regexp)
@@ -381,7 +385,7 @@ are allowed to refer to."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
#$(with-build-variables inputs outputs
#~(gnu-build #:source #+source
@@ -389,13 +393,20 @@ are allowed to refer to."
#:build #$build
#:outputs %outputs
#:inputs %build-inputs
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
- #:phases #$phases
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
#:locale #$locale
- #:bootstrap-scripts #$bootstrap-scripts
- #:configure-flags #$configure-flags
- #:make-flags #$make-flags
+ #:bootstrap-scripts #$(sexp->gexp bootstrap-scripts)
+ #:configure-flags #$(if (pair? configure-flags)
+ (sexp->gexp configure-flags)
+ configure-flags)
+ #:make-flags #$(if (pair? make-flags)
+ (sexp->gexp make-flags)
+ make-flags)
#:out-of-source? #$out-of-source?
#:tests? #$tests?
#:test-target #$test-target
@@ -472,10 +483,8 @@ is one of `host' or `target'."
(parallel-build? #t) (parallel-tests? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-unneeded"
- "--enable-deterministic-archives"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(validate-runpath? #t)
;; We run 'ldconfig' to generate ld.so.cache and it
@@ -498,7 +507,7 @@ cross-built inputs, and NATIVE-INPUTS are inputs that run
on the build
platform."
(define builder
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(define %build-host-inputs
(map (lambda (tuple)
@@ -523,11 +532,13 @@ platform."
#:outputs %outputs
#:inputs %build-target-inputs
#:native-inputs %build-host-inputs
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
- #:native-search-paths '#$(map
- search-path-specification->sexp
- native-search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:native-search-paths '#$(sexp->gexp
+ (map
+ search-path-specification->sexp
+ native-search-paths))
#:phases #$phases
#:locale #$locale
#:bootstrap-scripts #$bootstrap-scripts
diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 15454c3..f9d01cb 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -80,8 +80,7 @@
(define* (go-build name inputs
#:key
source
- (phases '(@ (guix build go-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(install-source? #t)
@@ -105,8 +104,9 @@
#:system #$system
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:install-source? #$install-source?
#:import-path #$import-path
#:unpack-path #$unpack-path
diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm
index b7ee725..67c8593 100644
--- a/guix/build-system/haskell.scm
+++ b/guix/build-system/haskell.scm
@@ -129,8 +129,7 @@ version REVISION."
(parallel-build? #f)
(configure-flags ''())
(extra-directories ''())
- (phases '(@ (guix build haskell-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out" "static"))
(search-paths '())
(system (%current-system))
@@ -143,7 +142,7 @@ provides a 'Setup.hs' file as its build system."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(haskell-build #:name #$name
#:source #+source
@@ -159,8 +158,9 @@ provides a 'Setup.hs' file as its build system."
#:haddock? #$haddock?
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm
index 6e006af..5b824d7 100644
--- a/guix/build-system/julia.scm
+++ b/guix/build-system/julia.scm
@@ -78,8 +78,7 @@
(define* (julia-build name inputs
#:key source
(tests? #t)
- (phases '(@ (guix build julia-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -92,15 +91,16 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(julia-build #:name #$name
#:source #+source
#:system #$system
#:tests? #$tests?
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)
#:julia-package-name #$julia-package-name))))
diff --git a/guix/build-system/linux-module.scm
b/guix/build-system/linux-module.scm
index 3a29a93..84570b9 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -155,8 +155,7 @@
source target
(search-paths '())
(tests? #t)
- (phases '(@ (guix build linux-module-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(make-flags ''())
(system (%current-system))
@@ -170,11 +169,12 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(linux-module-build #:name #$name
#:source #+source
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:phases #$phases
#:system #$system
#:target #$target
@@ -202,8 +202,7 @@
(search-paths '())
(native-search-paths '())
(tests? #f)
- (phases '(@ (guix build linux-module-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(system (%current-system))
(substitutable? #t)
(imported-modules
@@ -213,7 +212,7 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(define %build-host-inputs
'#+(input-tuples->gexp build-inputs))
@@ -232,8 +231,9 @@
#:inputs %build-target-inputs
#:native-inputs %build-host-inputs
#:search-paths
- '#$(map search-path-specification->sexp
- search-paths)
+ '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:native-search-paths
'#$(map
search-path-specification->sexp
diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm
index 04358e6..0af5922 100644
--- a/guix/build-system/maven.scm
+++ b/guix/build-system/maven.scm
@@ -157,8 +157,7 @@
(strip-flags ''("--strip-debug"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build maven-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(system (%current-system))
(imported-modules %maven-build-system-modules)
(modules '((guix build maven-build-system)
@@ -169,13 +168,14 @@ provides its own binaries."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(maven-build #:source #+source
#:system #$system
#:outputs #$(outputs->gexp outputs)
#:inputs #$(input-tuples->gexp inputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:phases #$phases
#:exclude '#$exclude
#:local-packages '#$local-packages
@@ -184,8 +184,8 @@ provides its own binaries."
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$strip-flags
- #:strip-directories #$strip-directories))))
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories #$(sexp->gexp strip-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index d1e1e4c..0d352aa 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -107,8 +107,7 @@
"bin" "sbin"))
(elf-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build meson-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(system (%current-system))
(imported-modules %meson-build-system-modules)
(modules '((guix build meson-build-system)
@@ -119,23 +118,27 @@
has a 'meson.build' file."
(define builder
(with-imported-modules imported-modules
- #~(let ((build-phases #$(if glib-or-gtk?
- phases
- #~(modify-phases #$phases
- (delete 'glib-or-gtk-compile-schemas)
- (delete 'glib-or-gtk-wrap)))))
+ #~(let ((build-phases #$(let ((phases (if (pair? phases)
+ (sexp->gexp phases)
+ phases)))
+ (if glib-or-gtk?
+ phases
+ #~(modify-phases #$phases
+ (delete 'glib-or-gtk-compile-schemas)
+ (delete 'glib-or-gtk-wrap))))))
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
#$(with-build-variables inputs outputs
#~(meson-build #:source #+source
#:system #$system
#:outputs %outputs
#:inputs %build-inputs
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:phases build-phases
- #:configure-flags #$configure-flags
+ #:configure-flags #$(sexp->gexp configure-flags)
#:build-type #$build-type
#:tests? #$tests?
#:test-target #$test-target
@@ -144,9 +147,9 @@ has a 'meson.build' file."
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$strip-flags
- #:strip-directories #$strip-directories
- #:elf-directories #$elf-directories)))))
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories #$(sexp->gexp
strip-directories)
+ #:elf-directories #$(sexp->gexp
elf-directories))))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index 751312a..3256b5d 100644
--- a/guix/build-system/minify.scm
+++ b/guix/build-system/minify.scm
@@ -76,8 +76,7 @@
#:key
source
(javascript-files #f)
- (phases '(@ (guix build minify-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(system (%current-system))
search-paths
@@ -89,14 +88,15 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(minify-build #:name #$name
#:source #+source
#:javascript-files #$javascript-files
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index c174da9..73a6f15 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -81,8 +81,7 @@ registry."
source
(npm-flags ''())
(tests? #t)
- (phases '(@ (guix build node-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -96,7 +95,7 @@ registry."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(node-build #:name #$name
#:source #+source
#:system #$system
@@ -104,8 +103,9 @@ registry."
#:tests? #$tests?
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm
index 32045ef..db0a916 100644
--- a/guix/build-system/perl.scm
+++ b/guix/build-system/perl.scm
@@ -100,17 +100,20 @@ provides a `Makefile.PL' file as its build system."
(define build
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
#$(with-build-variables inputs outputs
#~(perl-build #:name #$name
#:source #+source
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:make-maker? #$make-maker?
#:make-maker-flags #$make-maker-flags
- #:module-build-flags #$module-build-flags
- #:phases #$phases
+ #:module-build-flags #$(sexp->gexp
module-build-flags)
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
#:system #$system
#:test-target "test"
#:tests? #$tests?
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index 10e3ebf..2652c12 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -177,8 +177,7 @@ pre-defined variants."
(test-target "test")
(use-setuptools? #t)
(configure-flags ''())
- (phases '(@ (guix build python-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -191,7 +190,7 @@ provides a 'setup.py' file as its build system."
(define build
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
#$(with-build-variables inputs outputs
#~(python-build #:name #$name
@@ -201,10 +200,13 @@ provides a 'setup.py' file as its build system."
#:system #$system
#:test-target #$test-target
#:tests? #$tests?
- #:phases #$phases
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
#:outputs %outputs
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:inputs %build-inputs)))))
diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index 036dbde..894d2a6 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -123,8 +123,7 @@
(strip-flags ''("--strip-debug"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build qt-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(qt-wrap-excluded-outputs ''())
(system (%current-system))
(imported-modules %qt-build-system-modules)
@@ -135,13 +134,14 @@ provides a 'CMakeLists.txt' file as its build system."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(qt-build #:source #+source
#:system #$system
#:outputs %outputs
#:inputs %build-inputs
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:phases #$phases
#:qt-wrap-excluded-outputs #$qt-wrap-excluded-outputs
#:configure-flags #$configure-flags
@@ -191,8 +191,7 @@ provides a 'CMakeLists.txt' file as its build system."
"--enable-deterministic-archives"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build qt-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(system (%current-system))
(build (nix-system->gnu-triplet system))
(imported-modules %qt-build-system-modules)
@@ -204,7 +203,7 @@ build system."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(define %build-host-inputs
#+(input-tuples->gexp build-inputs))
@@ -220,8 +219,9 @@ build system."
#:outputs #$(outputs->gexp outputs)
#:inputs %build-target-inputs
#:native-inputs %build-host-inputs
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:native-search-paths '#$(map
search-path-specification->sexp
native-search-paths)
diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index 12b7df6..c4425e0 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -109,8 +109,7 @@ release corresponding to NAME and VERSION."
(tests? #t)
(test-target "tests")
(configure-flags ''())
- (phases '(@ (guix build r-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -123,7 +122,7 @@ release corresponding to NAME and VERSION."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(r-build #:name #$name
#:source #+source
#:configure-flags #$configure-flags
@@ -132,8 +131,9 @@ release corresponding to NAME and VERSION."
#:test-target #$test-target
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/rakudo.scm b/guix/build-system/rakudo.scm
index eab41e2..05a4d9c 100644
--- a/guix/build-system/rakudo.scm
+++ b/guix/build-system/rakudo.scm
@@ -103,8 +103,7 @@
source
(search-paths '())
(tests? #t)
- (phases '(@ (guix build rakudo-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(system (%current-system))
(guile #f)
@@ -117,11 +116,12 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(rakudo-build #:name #$name
#:source #+source
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:phases #$phases
#:system #$system
#:tests? #$tests?
diff --git a/guix/build-system/renpy.scm b/guix/build-system/renpy.scm
index 5c65f55..0ee73ec 100644
--- a/guix/build-system/renpy.scm
+++ b/guix/build-system/renpy.scm
@@ -77,8 +77,7 @@
(define* (renpy-build name inputs
#:key
source
- (phases '(@ (guix build renpy-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(configure-flags ''())
(outputs '("out"))
(output "out")
@@ -93,7 +92,7 @@
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(renpy-build #:name #$name
#:source #+source
#:configure-flags #$configure-flags
@@ -102,8 +101,9 @@
#:outputs #$(outputs->gexp outputs)
#:output #$output
#:game #$game
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index 8b02e0f..342daf7 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -80,8 +80,7 @@ NAME and VERSION."
(gem-flags ''())
(test-target "test")
(tests? #t)
- (phases '(@ (guix build ruby-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -92,7 +91,7 @@ NAME and VERSION."
"Build SOURCE using RUBY and INPUTS."
(define build
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
#$(with-build-variables inputs outputs
#~(ruby-build #:name #$name
@@ -101,10 +100,13 @@ NAME and VERSION."
#:gem-flags #$gem-flags
#:test-target #$test-target
#:tests? #$tests?
- #:phases #$phases
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
#:outputs %outputs
- #:search-paths '#$(map
search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:inputs %build-inputs))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm
index 6af6998..07fd008 100644
--- a/guix/build-system/scons.scm
+++ b/guix/build-system/scons.scm
@@ -79,11 +79,10 @@
(source #f)
(tests? #t)
(scons-flags ''())
- (build-targets ''())
+ (build-targets #~'())
(test-target "test")
- (install-targets ''("install"))
- (phases '(@ (guix build scons-build-system)
- %standard-phases))
+ (install-targets #~'("install"))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -96,17 +95,19 @@ provides a 'SConstruct' file as its build system."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
(scons-build #:name ,name
#:source #+source
- #:scons-flags #$scons-flags
+ #:scons-flags #$(sexp->gexp scons-flags)
#:system #$system
#:build-targets #$build-targets
#:test-target #$test-target
#:tests? #$tests?
#:install-targets #$install-targets
- #:phases #$phases
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
#:outputs (list #$@(map (lambda (name)
#~(cons #$name
(ungexp output name)))
@@ -114,8 +115,9 @@ provides a 'SConstruct' file as its build system."
#:inputs (map (lambda (tuple)
(apply cons tuple))
'#$inputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)))))
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))))))
(gexp->derivation name builder
#:system system
diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm
index 0a69d1f..c7fa2e3 100644
--- a/guix/build-system/texlive.scm
+++ b/guix/build-system/texlive.scm
@@ -144,24 +144,24 @@ level package ID."
(define builder
(with-imported-modules imported-modules
#~(begin
- (use-modules #$@modules)
- (texlive-build #:name #$name
- #:source #+source
- #:tex-directory #$tex-directory
- #:build-targets #$build-targets
- #:tex-format #$tex-format
- #:system #$system
- #:tests? #$tests?
- #:phases #$phases
- #:outputs (list #$@(map (lambda (name)
- #~(cons #$name
- (ungexp output
name)))
- outputs))
- #:inputs (map (lambda (tuple)
- (apply cons tuple))
- '#$inputs)
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)))))
+ (use-modules #$@(sexp->gexp modules))
+
+ #$(with-build-variables inputs outputs
+ #~(texlive-build #:name #$name
+ #:source #+source
+ #:tex-directory #$tex-directory
+ #:build-targets #$build-targets
+ #:tex-format #$tex-format
+ #:system #$system
+ #:tests? #$tests?
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths)))))))
(gexp->derivation name builder
#:system system
diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm
index 0f89524..73d452a 100644
--- a/guix/build-system/trivial.scm
+++ b/guix/build-system/trivial.scm
@@ -54,7 +54,10 @@
"Run build expression BUILDER, an expression, for SYSTEM. SOURCE is
ignored."
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
- system #:graft? #f)))
+ system #:graft? #f))
+ (builder -> (if (pair? builder)
+ (sexp->gexp builder)
+ builder)))
(gexp->derivation name (with-build-variables inputs outputs builder)
#:system system
#:target #f
@@ -72,7 +75,10 @@ ignored."
"Run build expression BUILDER, an expression, for SYSTEM. SOURCE is
ignored."
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
- system #:graft? #f)))
+ system #:graft? #f))
+ (builder -> (if (pair? builder)
+ (sexp->gexp builder)
+ builder)))
(gexp->derivation name (with-build-variables
(append build-inputs target-inputs)
outputs
diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm
index db604e6..e8cd552 100644
--- a/guix/build-system/waf.scm
+++ b/guix/build-system/waf.scm
@@ -77,9 +77,8 @@
#:key source
(tests? #t)
(test-target "check")
- (configure-flags ''())
- (phases '(@ (guix build waf-build-system)
- %standard-phases))
+ (configure-flags #~'())
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -91,7 +90,7 @@
as its build system."
(define build
#~(begin
- (use-modules #$@modules)
+ (use-modules #$@(sexp->gexp modules))
#$(with-build-variables inputs outputs
#~(waf-build #:name #$name
@@ -102,8 +101,9 @@ as its build system."
#:tests? #$tests?
#:phases #$phases
#:outputs %outputs
- #:search-paths '#$(map search-path-specification->sexp
- search-paths)
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
#:inputs %build-inputs))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/packages.scm b/guix/packages.scm
index 4eb81e8..2be9390 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -762,7 +762,9 @@ specifies modules in scope when evaluating SNIPPET."
module
(map resolve-interface '#+modules))
((@ (system base compile) compile)
- '#+snippet
+ '#+(if (pair? snippet)
+ (sexp->gexp snippet)
+ snippet)
#:to 'value
#:opts %auto-compilation-options
#:env module))
diff --git a/guix/svn-download.scm b/guix/svn-download.scm
index b961512..28ad499 100644
--- a/guix/svn-download.scm
+++ b/guix/svn-download.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
;;;
@@ -134,7 +134,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a
generic name if #f."
#$(svn-multi-reference-recursive? ref)
#:user-name #$(svn-multi-reference-user-name ref)
#:password #$(svn-multi-reference-password ref)))
- '#$(svn-multi-reference-locations ref)))))
+ '#$(sexp->gexp (svn-multi-reference-locations ref))))))
(mlet %store-monad ((guile (package->derivation guile system)))
(gexp->derivation (or name "svn-checkout") build
- 03/29: serialization: Micro-optimize string literal output in 'write-file-tree'., (continued)
- 03/29: serialization: Micro-optimize string literal output in 'write-file-tree'., guix-commits, 2021/03/08
- 04/29: grafts: Inline 'grafting?' and 'set-grafting'., guix-commits, 2021/03/08
- 08/29: gexp: Keep 'lower-inputs' private., guix-commits, 2021/03/08
- 01/29: store: Object cache profiling shows the number of entries., guix-commits, 2021/03/08
- 06/29: gexp: 'gexp-inputs' returns a list of <gexp-input> records., guix-commits, 2021/03/08
- 07/29: gexp: 'gexp-inputs' returns both native and non-native inputs., guix-commits, 2021/03/08
- 11/29: gexp: Reduce allocations in 'gexp-attribute'., guix-commits, 2021/03/08
- 09/29: gexp: Micro-optimize 'gexp->sexp' and 'lower-inputs'., guix-commits, 2021/03/08
- 13/29: gexp: Optimize 'with-build-variables'., guix-commits, 2021/03/08
- 10/29: gexp: Reduce allocations while traversing lists., guix-commits, 2021/03/08
- 20/29: build-system: Use 'sexp->gexp' for plain sexps.,
guix-commits <=
- 21/29: build-system: Use 'input-tuples->gexp' and 'outputs->gexp'., guix-commits, 2021/03/08
- 02/29: store: Micro-optimize object cache lookup., guix-commits, 2021/03/08
- 28/29: grafts: Add 'without-grafting'., guix-commits, 2021/03/08
- 29/29: gexp: Allowed/disallowed references and graphs never refer to grafted inputs., guix-commits, 2021/03/08
- 14/29: build-system: Rewrite using gexps., guix-commits, 2021/03/08
- 15/29: packages: Turn 'bag->derivation' into a monadic procedure., guix-commits, 2021/03/08
- 16/29: packages: Simplify patch instantiation., guix-commits, 2021/03/08
- 25/29: tests: Refer to '%derivation-cache' in the right module., guix-commits, 2021/03/08
- 26/29: packages: 'expand-input' accepts any file-like object., guix-commits, 2021/03/08
- 17/29: packages: Core procedures are written in monadic style., guix-commits, 2021/03/08