Age | Commit message (Collapse) | Author |
|
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>
|
|
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'.
|
|
* 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.
|
|
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 (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.
|
|
Conflicts:
etc/news.scm
gnu/local.mk
gnu/packages/bootloaders.scm
gnu/packages/linphone.scm
gnu/packages/linux.scm
gnu/packages/tls.scm
gnu/system.scm
|
|
* guix/gexp.scm (<scheme-file>)[load-path?]: New field.
(scheme-file): Add #:set-load-path? and honor it.
(scheme-file-compiler): Pass #:set-load-path? to 'gexp->file'.
* doc/guix.texi (G-Expressions): Document it.
|
|
Conflicts:
etc/news.scm
gnu/local.mk
gnu/packages/check.scm
gnu/packages/cross-base.scm
gnu/packages/gimp.scm
gnu/packages/java.scm
gnu/packages/mail.scm
gnu/packages/sdl.scm
gnu/packages/texinfo.scm
gnu/packages/tls.scm
gnu/packages/version-control.scm
|
|
* guix/gexp.scm (lower-references): Use 'mapm/accumulate-builds' instead
of 'mapm'.
|
|
Conflicts:
gnu/packages/admin.scm
gnu/packages/commencement.scm
gnu/packages/guile.scm
gnu/packages/linux.scm
gnu/packages/package-management.scm
gnu/packages/pulseaudio.scm
gnu/packages/web.scm
|
|
This doesn't have an noticeable impact on the run time of
'guix system build desktop.tmp --no-grafts -d'.
* guix/gexp.scm (lower-inputs): Use 'mapm/accumulate-builds' instead of 'mapm'.
|
|
This is a followup to b6bee63bed4f013064c0d902e7c8b83ed7514ade.
* guix/gexp.scm (lower-gexp, gexp->derivation): #:effective-version
defaults to "3.0".
|
|
This patch changes three things:
1. package derivations are built using Guile 3.0;
2. 'gexp->derivation' defaults to Guile 3.0;
3. "guile3.0-" packages are deprecated aliases for the regular
package, which now depends on Guile 3.0; "guile2.2-" packages are
introduced; "guile-next" is renamed to "guile".
* gnu/packages/guile.scm (guile-2.0/fixed): Remove.
(guile-3.0/fixed): New variable.
(package-for-guile-3.0): Remove.
(package-for-guile-2.2): New variable.
(define-deprecated-guile3.0-package): New macro.
(guile-3.0)[name]: Change to "guile".
(guile-json-3)[native-inputs, inputs]: New fields.
(guile2.2-json): New variable.
(guile3.0-json): Deprecate.
(guile-gdbm-ffi)[native-inputs]: Switch to GUILE-3.0.
(guile2.2-gdbm-ffi): New variable.
(guile3.0-gdbm-ffi): Deprecate.
(guile-sqlite3): Switch to GUILE-3.0.
(guile2.2-sqlite3): New variable.
(guile3.0-sqlite3): Deprecate.
(guile-bytestructures): Switch to GUILE-3.0.
(guile2.2-bytestructures): New variable.
(guile3.0-bytestructures): Deprecate.
(guile-git): Switch to GUILE-3.0.
(guile2.2-git): New variable.
(guile3.0-git): Deprecate.
(guile-2.2/bug-fix):
* gnu/packages/ci.scm (cuirass): Switch to GUILE-3.0.
* gnu/packages/emacs-xyz.scm (emacs-guix): Switch to GUILE-3.0.
* gnu/packages/gtk.scm (guile-cairo)[arguments]: New field.
Switch to GUILE-3.0.
(guile2.2-cairo): New variable.
(guile3.0-cairo): Deprecate.
(guile-rsvg): Switch to GUILE-3.0.
(guile2.2-cairo): New variable.
(guile3.0-cairo): Deprecate.
(guile-present): Switch to GUILE-3.0.
(guile2.2-present): New variable.
(guile3.0-present): Deprecate.
(guile-gnome)[propagated-inputs]: Use GUILE2.2-CAIRO and GUILE2.2-LIB.
* gnu/packages/guile-xyz.scm (guile-fibers)[arguments]: Add #:configure-flags.
Switch to GUILE-3.0.
(guile2.2-fibers): New variable.
(guile3.0-fibers): Deprecate.
(guile-syntax-highlight): Switch to GUILE-3.0.
(guile2.2-syntax-highlight): New variable.
(guile3.0-syntax-highlight): Deprecate.
(guile-colorized): Switch to GUILE-3.0.
(guile2.2-colorized): New variable.
(guile3.0-colorized): Deprecate.
(guile-pfds): Switch to GUILE-3.0.
(guile2.2-pfds): New variable.
(guile3.0-pfds): Deprecate.
(guile-simple-zmq): Switch to GUILE-3.0.
(guile2.2-simple-zmq): New variable.
(guile3.0-simple-zmq): Deprecate.
(guile-newt): Switch to GUILE-3.0.
(guile2.2-newt): New variable.
(guile3.0-newt): Deprecate.
(guile-parted): Switch to GUILE-3.0.
(guile2.2-parted): New variable.
(guile3.0-parted): Deprecate.
(guile-config): Switch to GUILE-3.0.
(guile2.2-config): New variable.
(guile3.0-config): Deprecate.
(guile-hall): Switch to GUILE-3.0.
(guile2.2-hall): New variable.
(guile3.0-hall): Deprecate.
(guile-ics): Switch to GUILE-3.0.
(guile2.2-ics): New variable.
(guile3.0-ics): Deprecate.
(guile-wisp)[arguments]: Add 'support-guile-3.0' phase.
Switch to GUILE-3.0.
(guile2.2-wisp): New variable.
(guile3.0-wisp): Deprecate.
(guile-lib): Switch to GUILE-3.0.
(guile2.2-lib): New variable.
(guile3.0-lib): Deprecate.
(guile-minikanren): Switch to GUILE-3.0.
(guile2.2-minikanren): New variable.
(guile3.0-minikanren): Deprecate.
(guile-irregex): Switch to GUILE-3.0.
(guile2.2-irregex): New variable.
(guile3.0-irregex): Deprecate.
(haunt): Switch to GUILE-3.0, and remove GUILE-READER.
(guile2.2-haunt): New variable.
(guile3.0-haunt): Deprecate.
(guile-commonmark): Switch to GUILE-3.0.
(guile2.2-commonmark): New variable.
(guile3.0-commonmark): Deprecate.
(mcron): Switch to GUILE-3.0.
(guile2.0-mcron): New variable.
(guile3.0-mcron): Deprecate.
(guile-picture-language): Switch to GUILE-3.0.
(guile2.2-picture-language): New variable.
(guile3.0-picture-language): Deprecate.
(guile-gi): Switch to GUILE-3.0.
(guile2.2-gi): New variable.
(guile3.0-gi): Deprecate.
(guile-hashing): Switch to GUILE-3.0.
(guile2.2-hashing): New variable.
(guile3.0-hashing): Deprecate.
* gnu/packages/package-management.scm (guix): Switch to GUILE-3.0.
(guile2.2-guix): New variable.
(guile3.0-guix): Deprecate.
(gwl): Replace "guile3.0-" with "guile-".
(guix-jupyter)[source]: Adjust for Guile 3.0.
Switch to GUILE-3.0.
* gnu/packages/ssh.scm (guile-ssh): Switch to GUILE-3.0.
(guile2.2-ssh): New variable.
(guile3.0-ssh): Deprecate.
* gnu/packages/admin.scm (shepherd): Switch to GUILE-3.0.
(guile2.2-shepherd): New variable.
(guile3.0-shepherd): Deprecate.
* gnu/packages/mail.scm (mailutils): Switch to GUILE-3.0.
(guile2.2-mailutils): New variable.
(guile3.0-mailutils): Deprecate.
* gnu/packages/plotutils.scm (guile-charting): Switch to GUILE-3.0.
(guile2.2-charting): New variable.
(guile3.0-charting): Deprecate.
* gnu/packages/version-control.scm (libgit2): Switch to GUILE-3.0.
* gnu/packages/vpn.scm (vpnc-scripts): Switch to GUILE-3.0.
* gnu/packages/web.scm (guix-data-service): Switch to GUILE-3.0.
(hpcguix-web): Switch to GUILE-3.0.
* guix/self.scm (specification->package): Refer to the "guile-" variants
instead of "guile3.0-".
* guix/gexp.scm (default-guile): Change to GUILE-3.0.
* build-aux/build-self.scm (build): #:guile-version defaults to "3.0".
* gnu/packages/commencement.scm (guile-final): Base on GUILE-3.0/FIXED.
|
|
|
|
* guix/gexp.scm (<parameterized>): New record type.
(with-parameters): New macro.
(compile-parameterized): New gexp compiler.
* tests/gexp.scm ("with-parameters for %current-system")
("with-parameters for %current-target-system")
("with-parameters + file-append"): New tests.
* doc/guix.texi (G-Expressions): Document it.
|
|
* guix/gexp.scm (lower-object): Set target argument to 'current by default and
look for the current target system at bind time if needed,
(gexp->file): ditto,
(gexp->script): ditto,
(lower-gexp): make sure lowered extensions are not cross-compiled.
* tests/gexp.scm: Add cross-compilation test-cases for gexp->script and
gexp->file with a target passed explicitely and with a default target.
|
|
* guix/gexp.scm (lower-object): Set target argument to 'current by default and
look for the current target system at bind time if needed,
(gexp->file): ditto,
(gexp->script): ditto,
(lower-gexp): make sure lowered extensions are not cross-compiled.
* tests/gexp.scm: Add cross-compilation test-cases for gexp->script and
gexp->file with a target passed explicitely and with a default target.
|
|
* guix/gexp.scm (%not-slash): Remove.
(file-mapping->tree): Move to...
* guix/store.scm (file-mapping->tree): ... here.
|
|
|
|
* guix/gexp.scm (<raw-derivation-file>): New record type.
(raw-derivation-file-compiler): New gexp compiler.
* tests/gexp.scm ("lower-gexp, raw-derivation-file")
("raw-derivation-file"): New tests.
|
|
* guix/gexp.scm (gexp->script): Pass #:local-build? and #:substitutable?
to 'gexp->derivation'.
|
|
|
|
* guix/gexp.scm (gexp->file): Add system and target arguments and pass them to
gexp->derivation and load-path-expression calls,
(scheme-file-compiler): adapt accordingly to pass system and target arguments.
|
|
* guix/gexp.scm (gexp->file): Add system and target arguments and pass them to
gexp->derivation and load-path-expression calls,
(scheme-file-compiler): adapt accordingly to pass system and target arguments.
|
|
Fixes <https://bugs.gnu.org/38628>.
* tests/gexp.scm ("lower-gexp, character literal"): New test.
* guix/gexp.scm (gexp->sexp)[self-quoting?]: Add CHAR? to the tested types.
* guix/repl.scm (self-quoting?): Likewise.
* gnu/tests.scm (marionette-shepherd-service)[self-quoting?]: Likewise.
|
|
* guix/gexp.scm (compiled-modules): Remove conditional.
|
|
* guix/gexp.scm (local-file): Distinguish the case where FILE is a
literal string and when it's not. Add a clause for when FILE is not a
literal string.
* tests/gexp.scm ("local-file, non-literal relative file name"): New test.
* doc/guix.texi (G-Expressions): Update accordingly.
|
|
This reduces the number of 'add-data-to-store' cache lookups from 3329
to 2743 (hit rate: 27% to 11%) when running:
GUIX_PROFILING=add-data-to-store-cache guix build libreoffice -nd
Execution time of "guix build libreoffice -nd" goes from 1.86s to 1.80s.
* guix/gexp.scm (imported+compiled-modules): Wrap body in 'mcached'.
|