Previously, 'guix system vm' would start by computing the bootcfg
derivation, which itself depended on an incorrect OS derivation (for the
original OS instead of the one passed through
'virtualized-operating-system'.) That added overhead and would force
the user's config file to define a root file system, for example, even
though it makes no sense in the case of a VM.
* guix/scripts/system.scm (perform-action)[bootcfg]: Limit to the 'init'
and 'reconfigure' actions.
Fixes <https://bugs.gnu.org/35341>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.
Previously, we'd call 'ensure-default-profile' before the connection to
the daemon has been opened. On the first connection, the daemon ensures
that /var/guix/profiles/per-user is world-writable. Since we were
calling 'ensure-default-profile' before that,
/var/guix/profiles/per-user was typically non-writable (555 and
root-owned), and thus 'guix pull' would error out.
* guix/scripts/pull.scm (guix-pull): Call 'ensure-default-profile'
within 'with-store'.
* guix/scripts/build.scm (%default-options): Remove 'system'.
(%options) <--system>: Keep previous occurrences of 'system in RESULT.
(options->derivations)[system]: Remove.
[systems, things-to-build]: New variables.
[compute-derivation]: New procedure.
Iterate on all of SYSTEMS to compute the derivations of THINGS-TO-BUILD.
* tests/guix-build.sh: Add test for one and multiple '-s' flags.
* doc/guix.texi (Additional Build Options): Document this behavior.
* guix/build/guile-build-system.scm (build): Use invoke-each, instead of
for-each, to use multiple cores if available.
(invoke-each, report-build-process): New procedures.
Fixes <https://bugs.gnu.org/35053>.
Reported by Efraim Flashner <efraim@flashner.co.il>.
Previously 'check-github-url' would let Guile 2.2's (web client) module
take care of opening the connection. Consequently, it wouldn't use the
TLS priority strings that we use in (guix build download),
'open-connection-for-uri'. In particular, it would not disable TLSv1.3,
which would trigger <https://bugs.gnu.org/34102> for github.com.
* guix/scripts/lint.scm (check-github-url): Add #:timeout parameter.
[follow-redirect]: Change parameter name to 'url' and pass it to
'string->uri'. Call 'guix:open-connection-for-uri' to open the
connection and pass it to 'http-head' via #:port.
This variable is unused since commit
45779fa676.
* guix/self.scm (%dependency-variables): Remove.
* build-aux/build-self.scm (%dependency-variables): Remove.
On a profile with 280 packages, this reduces the number of
'valid-paths?' RPCs made by 'guix package -nu' from 6K to 500.
* guix/derivations.scm (derivation-prerequisites-to-build)[built?]:
Memoize 'valid-path?' calls.
The caching strategy introduced in
40cc850aeb was ineffective since we
regularly start from an empty object cache. For example, "guix build
inkscape -n" would make 241 'built-in-builders' RPCs.
* guix/store.scm (<store-connection>)[built-in-builders]: New field.
(open-connection): Adjust '%make-store-connection' call accordingly.
(port->connection): Likewise.
(built-in-builders): Rename to...
(%built-in-builders): ... this.
(built-in-builders): New procedure.
* guix/download.scm (built-in-builders*): Remove 'mcached' call.
Fixes <https://bugs.gnu.org/35271>.
Reported by rendaw <7e9wc56emjakcm@s.rendaw.me>.
* guix/scripts/build.scm (register-root): When ROOT is a relative file
name, append the basename of ROOT, not ROOT itself.
* tests/guix-build.sh: Add test.
* guix/scripts/gc.scm (show-help, %options): Add
'--delete-generations'. Change '--delete' shorthand to '-D'.
(delete-old-generations): New procedure.
(guix-gc)[delete-generations]: New procedure.
Call it when ACTION is 'collect-garbage' and OPTS contains
'delete-generations.
* doc/guix.texi (Invoking guix gc): Document it.
* guix/ui.scm (define-diagnostic): Add 'colors' parameter and pass it to
'print-diagnostic-prefix'.
(warning, info, report-error): Add extra argument.
(%warning-colors, %info-colors, %error-colors): New variables.
(print-diagnostic-prefix): Add #:colors parameter and honor it.
* guix/ui.scm (define-diagnostic): Add optional 'location' parameter.
Pass it to 'print-diagnostic-prefix'.
(print-diagnostic-prefix): Add optional 'location' parameter and honor
it.
(report-load-error): Use 'report-error' and 'warning' instead
of (format (current-error-port) …).
* guix/ui.scm (define-diagnostic): Expect PREFIX to be enclosed in
'G_'. Emit call to 'gettext' on PREFIX.
(warning, info, report-error): Wrap prefix in 'G_'.
Until now, we'd pass 'gettext' the "augmented" format string, which
'gettext' would not find in message catalogs. Now we pass it FMT as is,
which is what catalogs contain.
* guix/ui.scm (define-diagnostic)[augmented-format-string]: Remove.
Emit one 'format' call to print the prefix, and a second one to print
the actual message.
* guix/build-system/cargo.scm (%cargo-build-system-modules):
Add (json parser).
(cargo-build):
[vendor-dir]: Define flag and pass it to builder code.
[cargo-test-flags]: Likewise.
[skip-build?]: Likewise.
* guix/build/cargo-build/system.scm (#:use-module): use (json parser).
(package-name->crate-name): Delete it.
(manifest-targets): Add it.
(has-executable-target?): Add it.
(configure): Add #:vendor-dir name and use it.
Don't touch Cargo.toml.
Don't symlink to duplicate inputs.
Remove useless registry line from cargo config.
Define RUSTFLAGS to lift lint restrictions.
(build): Add #:skip-build? flag and use it.
(check): Likewise.
Add #:cargo-test-flags and pass it to cargo.
(install): Factor source logic to install-source.
Define #:skip-build? flag and use it.
Only install if executable targets are present.
(install-source): Copy entire crate directory not just src.
[generate-checksums] pass dummy file for unused second argument.
(%standard-phases): Add install-source phase.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
This reduces 'guix size' run time by ~4% here:
items="$(guix build icecat inkscape emacs libreoffice)"
guix size $items
* guix/scripts/size.scm (store-profile): Define 'size-table' and use it
to lookup the size of ITEM in 'dependency-size'.
This works around <https://bugs.gnu.org/15602> in the context of
modules specified with 'with-imported-modules'.
* guix/gexp.scm (gexp->derivation): Add #:pre-load-modules? parameter
and pass it to 'compiled-modules'.
(compiled-modules): Add #:pre-load-modules? parameter and honor it.
* guix/packages.scm (patch-and-repack): Pass #:pre-load-modules? to
'gexp->derivation'.