Age | Commit message (Collapse) | Author |
|
Fixes <https://issues.guix.gnu.org/50676>.
Reported by Mathieu Othacehe <othacehe@gnu.org>.
Commit a779363b6aa581e88eda21f9f35530962d54ac25 was partially incorrect:
references passed to #:allowed-references or #:references-graphs *can*
be lowered as references to grafted elements. This is for example the
case when doing:
(computed-file "partition.img" exp
#:options `(#:references-graphs ,inputs))
Here INPUTS must be lowered as a reference to suitably grafted elements.
Failing to do that, the reference graph will not match the actual
INPUTS.
However, when building a package, those references must indeed refer
only to ungrafted packages. This commit preserves that by having build
systems pass #:graft? #f.
* guix/gexp.scm (lower-reference-graphs, lower-references): Remove uses
of 'without-grafting'. This reverts
a779363b6aa581e88eda21f9f35530962d54ac25.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build):
Pass #:graft? #f.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build)
(glib-or-gtk-cross-build): Likewise.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Likewise.
* guix/build-system/meson.scm (meson-build, meson-cross-build): Likewise.
* guix/build-system/trivial.scm (trivial-build, trivial-cross-build):
Likewise.
* tests/gexp.scm ("lower-object, computed-file + grafts"): New test.
* tests/packages.scm ("trivial with #:allowed-references + grafts"): New
test.
|
|
|
|
It will be used in the 'optional-tests' linter.
* guix/gexp.scm (gexp->approximate-sexp): New procedure.
* tests/gexp.scm
("no references", "unquoted gexp", "unquoted gexp (native)")
("spliced gexp", "unspliced gexp, approximated")
("unquoted gexp, approximated"): Test it.
* doc/gexp.scm ("G-Expressions"): Document it.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
|
|
* guix/gexp.scm (mixed-text-file)[build]: Call 'set-port-encoding!'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
Fixes a regression introduced in
2eafeb2f3d661061bc412c3f27c90202e4532532 whereby extensions would not be
added as inputs of the resulting derivation.
* guix/gexp.scm (compiled-modules): Append EXTENSIONS to the second
argument of 'gexp-with-hidden-inputs'.
|
|
This reduces the number of 'add-text-to-store' RPCs by 15 (out of 3336)
oin "guix build -d --no-grafts libreoffice".
* guix/gexp.scm (gexp-with-hidden-inputs): New procedure.
(compiled-modules): Use it. Pass #:script-name. Augment #:env-vars.
|
|
Previously 'gexp->script' would unconditionally use the
default #:guile-for-build value of 'gexp->derivation'.
* guix/gexp.scm (gexp->script): Pass #:guile to 'load-path-expression'.
Pass #:guile-for-build to 'gexp->derivation'.
|
|
* guix/gexp.scm (load-path-expression): Add #:guile parameter and honor it.
|
|
* guix/gexp.scm (imported+compiled-modules): Pass #:guile to
'imported-modules'.
|
|
That was needlessly making the object cache grow.
* guix/gexp.scm (lower-object, lower+expand-object): Bypass the object
cache when OBJ is a derivation. This almost halves the number of
cache lookups and reduces the number of entries from 3.4K to 2.6K when
doing "guix build libreoffice -d --no-grafts".
|
|
* guix/gexp.scm (lower-reference-graphs, lower-references): Wrap
'lower-object' call in 'without-grafting' since these things never refer
to grafted inputs.
|
|
* guix/gexp.scm (input-tuples->gexp, outputs->gexp): Make public.
* guix/build-system/cargo.scm (cargo-build): Use them.
* guix/build-system/gnu.scm (gnu-cross-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/cmake.scm (cmake-cross-build): Likewise.
|
|
* guix/gexp.scm (sexp->gexp): New procedure.
* tests/gexp.scm ("sexp->gexp"): New test.
|
|
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-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.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
|
|
* guix/gexp.scm (input-tuples->gexp, outputs->gexp): New procedures.
(with-build-variables): Use it.
|
|
* guix/gexp.scm (with-build-variables): New procedure.
|
|
Previously 'gexp->script' would unconditionally use the
default #:guile-for-build value of 'gexp->derivation'.
* guix/gexp.scm (gexp->script): Pass #:guile to 'load-path-expression'.
Pass #:guile-for-build to 'gexp->derivation'.
|
|
* guix/gexp.scm (load-path-expression): Add #:guile parameter and honor it.
|
|
* guix/gexp.scm (imported+compiled-modules): Pass #:guile to
'imported-modules'.
|
|
|
|
* guix/gexp.scm (compiled-modules): Pass #:target to 'gexp->derivation'.
|
|
Fixes a regression introduced in
c6d6aee6659acb293eb33f498fdac3b47a19a48, where #:reference-graphs would
end up referring to native inputs.
This would notably break the compilation of systems using a childhurd,
because they would attempt to build the 'hurd' package natively.
* guix/gexp.scm (lower-reference-graphs)[tuple->gexp-input]: Honor TARGET.
* tests/gexp.scm ("gexp->derivation #:references-graphs cross-compilation"):
New test.
|
|
* guix/gexp.scm (gexp-attribute): Use 'fold' and 'fold/tree' instead of
'append-map'.
|
|
This reduces the total amount of memory allocated by 8% when running
"guix build qemu -d --no-grafts".
* guix/gexp.scm (fold/tree): New procedure.
(gexp-inputs)[interesting?]: New procedure.
[add-reference-inputs]: Change (lst ...) clause to (? pair? lst), and
use 'fold/tree' to recurse into it.
(gexp-inputs)[add-reference-output]: Likewise, and remove
plain (lst ...) clause.
Call 'fold'.
(gexp->sexp)[reference->sexp]: In the list case, avoid boxing and
recursive call when the object has a plain non-aggregate type.
|
|
* guix/gexp.scm (lower-inputs, gexp->sexp): Change keyword parameters to
positional parameters. Adjust callers accordingly.
* tests/gexp.scm (gexp->sexp*, "gexp->file"): Adjust accordingly.
|
|
It had been made public in 6b6298ae39bfe185ce1ab18bb3d641ddfad17c8f but
it's no longer needed since 779aa003fbacbbcb6973f289b607d1d285009cec.
* guix/gexp.scm (lower-inputs): Do not export.
|
|
This avoids double traversal of references and extra bookkeeping,
thereby further reducing memory allocations.
* guix/gexp.scm (lower-gexp): Include only one call to 'lower-inputs'.
(gexp-inputs): Remove #:native? parameter.
[set-gexp-input-native?]: New procedure.
[add-reference-inputs]: Use it.
(gexp-native-inputs): Remove.
* tests/gexp.scm (gexp-native-inputs): Remove.
(gexp-input->tuple): Include 'gexp-input-native?'.
("let-system")
("let-system, nested")
("ungexp + ungexp-native")
("ungexp + ungexp-native, nested")
("ungexp + ungexp-native, nested, special mixture")
("input list")
("input list + ungexp-native")
("input list splicing")
("input list splicing + ungexp-native-splicing")
("gexp list splicing + ungexp-splicing"): Adjust accordingly.
|
|
This slightly reduces memory allocation.
* guix/gexp.scm (lower-inputs): Expect a list of <gexp-input> rather
than a list of tuples.
(lower-reference-graphs)[tuple->gexp-input]: New procedure.
Use it.
(gexp-inputs): Return a list of <gexp-input> rather than a list of
tuples.
* tests/gexp.scm (gexp-input->tuple): New procedure.
("one input package")
("one input package, dotted list")
("one input origin")
("one local file")
("one local file, symlink")
("one plain file")
("two input packages, one derivation, one file")
("file-append")
("file-append, output")
("file-append, nested")
("let-system")
("let-system, nested")
("ungexp + ungexp-native")
("ungexp + ungexp-native, nested")
("ungexp + ungexp-native, nested, special mixture")
("input list")
("input list + ungexp-native")
("input list splicing")
("input list splicing + ungexp-native-splicing")
("gexp list splicing + ungexp-splicing"): Adjust accordingly.
|
|
* guix/gexp.scm (sexp->string): New procedure.
(gexp->derivation): Use it instead of 'object->string'.
|
|
Conflicts:
gnu/local.mk
gnu/packages/cmake.scm
gnu/packages/curl.scm
gnu/packages/gl.scm
gnu/packages/glib.scm
gnu/packages/guile.scm
gnu/packages/node.scm
gnu/packages/openldap.scm
gnu/packages/package-management.scm
gnu/packages/python-xyz.scm
gnu/packages/python.scm
gnu/packages/tls.scm
gnu/packages/vpn.scm
gnu/packages/xorg.scm
|
|
* configure.ac: For Guile 2.2, require 2.2.6 or later.
* guix/gexp.scm (define-syntax-parameter-once): Remove.
Use 'define-syntax-parameter' instead.
* guix/mnoads.scm: Likewise.
* guix/inferior.scm (proxy)[select*]: Remove.
* guix/scripts/publish.scm <top level>: Remove replacement for (@@ (web
http) read-header-line).
* guix/store/deduplication.scm (counting-wrapper-port): Remove.
(nar-sha256): Call 'port-position' on PORT to compute SIZE.
|
|
|
|
While importing those modules from the host system is valid, it is often
a mistake that introduces non-reproducibility. This patch prints a
warning when that happens.
* guix/gexp.scm (gexp-attribute): Add #:validate parameter and honor it.
(gexp-modules)[validate-modules]: New procedure.
Pass it to 'gexp-attribute'.
* tests/gexp.scm ("gexp-modules, warning"): New test.
|
|
* guix/gexp.scm (<gexp>)[location]: New field.
(gexp-location): New procedure.
(write-gexp): Print the location of GEXP.
(gexp->derivation): Adjust call to 'make-gexp'.
(gexp): Likewise.
|
|
Conflicts:
gnu/packages/admin.scm
gnu/packages/commencement.scm
gnu/packages/gdb.scm
gnu/packages/llvm.scm
gnu/packages/package-management.scm
gnu/packages/tls.scm
|
|
Fixes a bug introduced in 5d4ad8e1be6d60c38577e2f3d92cc5642b12eff0,
whereby files enclosed in 'assume-valid-file-name' would be looked up
relative to the source directory instead of relative to the current
directory.
* guix/gexp.scm (local-file): In the 'assume-valid-file-name' case, look
up FILE relative to the current working directory.
|
|
* guix/gexp.scm (assume-valid-file-name): New variable.
(local-file): Add clause with (assume-valid-file-name file).
|
|
Fixes a regression introduced in
f43ffee90882c2d61b46d69728daa7432be297e4.
Reported by jonsger on #guix.
* guix/gexp.scm (local-file): In the non-literal case, add #:literal?
and #:location after REST.
|
|
Fixes <https://bugs.gnu.org/43736>.
Reported by Vitaliy Shatrov <guix.vits@disroot.org>.
* guix/gexp.scm (%local-file): Add #:literal? and #:location.
Emit a warning when LITERAL? is false and FILE is not absolute.
(local-file): In the non-literal case, pass #:location and #:literal?.
* po/guix/POTFILES.in: Add guix/gexp.scm.
* tests/guix-system.sh: Add test for the warning.
|
|
|
|
In order to do so, default to an empty options list, and expose options whose
default values are sensitive directly as keyword arguments.
* guix/gexp.scm (computed-file): Extract the LOCAL-BUILD? parameter from the
OPTIONS parameter to make it a stand-alone keyword argument. Introduce an
OPTIONS* binding which is obtained by combining the LOCAL-BUILD? keyword and
its value with OPTIONS.
* doc/guix.texi (G-Expressions): Adjust doc.
Suggested-by: Ludovic Courtès <ludo@gnu.org>
|
|
* guix/gexp.scm (compiled-modules): Add #:optimization-level.
[build](optimizations-for-level): New variable.
(process-entry): Use it.
|
|
|
|
* guix/gexp.scm (imported-files/derivation): Pass #:substitutable? #f to
'gexp->derivation'.
|
|
* guix/self.scm (file-append*): Add 'local-file?' case.
* guix/gexp.scm (local-file-select?): Export.
|
|
Fixes <https://bugs.gnu.org/41527>.
Regression introduced in d03001a31a6d460b712825640dba11e3f1a53a14.
* guix/gexp.scm (lower+expand-object): When LOWERED is not a struct and
EXPAND is true, call EXPAND.
* tests/gexp.scm ("file-append, raw store item"): New test.
|
|
* guix/gexp.scm (<system-binding>): New record type.
(let-system): New macro.
(system-binding-compiler): New procedure.
(default-expander): Add 'self-quoting?' case.
(self-quoting?): New procedure.
(lower-inputs): Add 'filterm'. Pass the result of
'mapm/accumulate-builds' through FILTERM.
(gexp->sexp)[self-quoting?]: Remove.
* tests/gexp.scm ("let-system", "let-system, target")
("let-system, ungexp-native, target")
("let-system, nested"): New tests.
* doc/guix.texi (G-Expressions): Document it.
|
|
* guix/gexp.scm (lower-object): Iterate if LOWERED is a struct.
(lower+expand-object): New procedure.
(gexp->sexp): Use it.
(define-gexp-compiler): Adjust docstring.
|
|
* guix/gexp.scm (<system-binding>): New record type.
(let-system): New macro.
(system-binding-compiler): New procedure.
(default-expander): Add 'self-quoting?' case.
(self-quoting?): New procedure.
(lower-inputs): Add 'filterm'. Pass the result of
'mapm/accumulate-builds' through FILTERM.
(gexp->sexp)[self-quoting?]: Remove.
* tests/gexp.scm ("let-system", "let-system, target")
("let-system, ungexp-native, target")
("let-system, nested"): New tests.
* doc/guix.texi (G-Expressions): Document it.
|
|
* guix/gexp.scm (lower-object): Iterate if LOWERED is a struct.
(lower+expand-object): New procedure.
(gexp->sexp): Use it.
(define-gexp-compiler): Adjust docstring.
|