* guix/git-download.scm (git-package): New procedure.
(git-fetch): Use it. Remove 'git-for-build'.
Use a gexp and 'gexp->derivation'.
* guix/download.scm (gnutls-package): Fix docstring.
Fixes <http://bugs.gnu.org/18305>.
Reported by Brandon Invergo <brandon@gnu.org>.
* guix/profiles.scm (manifest-inputs, info-dir-file): New procedures.
(profile-derivation): Use them. Add #:info-dir? parameter and honor
it.
* guix/scripts/package.scm (guix-package): Call 'profile-derivation'
with #:info-dir? #f when the 'bootstrap? option is set.
* tests/profiles.scm ("profile-derivation"): Pass #:info-dir? #f.
* guix/profiles.scm (<manifest-transaction>): New record-type.
(manifest-perform-transaction): New procedure.
(manifest-show-transaction): New procedure.
* tests/profiles.scm ("manifest-perform-transaction"): New test.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix/gexp.scm (<gexp>)[natives]: New field.
(write-gexp): Use both 'gexp-references' and
'gexp-native-references'.
(gexp->derivation): Use both 'gexp-inputs' and 'gexp-native-inputs',
and append them.
(gexp-inputs): Add 'references' parameter and honor it.
(gexp-native-inputs): New procedure.
(gexp->sexp)[reference->sexp]: Add 'native?' parameter and honor it.
Use it, and use 'gexp-native-references'.
(gexp)[collect-native-escapes]: New procedure.
[escape->ref]: Handle 'ungexp-native' and 'ungexp-native-splicing'.
[substitute-ungexp, substitute-ungexp-splicing]: New procedures.
[substitute-references]: Use them, and handle 'ungexp-native' and
'ungexp-native-splicing'.
Adjust generated 'make-gexp' call to provide both normal references
and native references.
[read-ungexp]: Support 'ungexp-native' and
'ungexp-native-splicing'.
Add reader extension for #+.
* tests/gexp.scm (gexp-native-inputs): New procedure.
(gexp->sexp*): Add 'target' parameter.
("ungexp + ungexp-native",
"input list + ungexp-native",
"input list splicing + ungexp-native-splicing",
"gexp->derivation, ungexp-native",
"gexp->derivation, ungexp + ungexp-native"): New tests.
("sugar"): Add tests for #+ and #+@.
* doc/guix.texi (G-Expressions): Document 'ungexp-native' et al.
* guix/gexp.scm (lower-inputs): Add #:system and #:target. Use
'package->cross-derivation' when TARGET is true. Honor SYSTEM.
(gexp->derivation): Add #:target argument. Pass SYSTEM and TARGET to
'lower-inputs' and 'gexp->sexp'.
(gexp->sexp): Add #:system and #:target. Pass them in recursive call
and to 'package-file'.
* tests/gexp.scm (gexp->sexp*): Add 'system' and 'target' parameters.
("gexp->derivation, cross-compilation"): New test.
* guix/monads.scm (package-file): Add #:target keyword parameter and
honor it.
(package->cross-derivation): New procedure.
* tests/monads.scm ("package-file + package->cross-derivation"): New test.
* doc/guix.texi (The Store Monad): Update 'package-file' documentation.
Add 'package->cross-derivation'.
Fixes <http://bugs.gnu.org/17468>.
* guix/ui.scm (fill-paragraph): Two spaces after period and no spaces before newline.
* tests/ui.scm: New test case.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Suggested by Alex Kost <alezost@gmail.com>.
* guix/scripts/package.scm (options->installable)[package->manifest-entry]:
Move to (guix profiles).
[package->manifest-entry*]: New procedure.
Use it.
* guix/profiles.scm (package->manifest-entry): New procedure.
* tests/profiles.scm (guile-for-build): New variable.
Call '%guile-for-build'.
("profile-derivation"): New test.
* guix/profiles.scm (<manifest-entry>)[path]: Rename to...
[item]: ... this. Update users.
(manifest->sexp): Rename to...
(manifest->gexp): ... this. Return a gexp.
(lower-input): Remove.
(profile-derivation): Remove 'store' parameter, and turn into a
monadic procedure.
[inputs]: New variable.
[builder]: Turn into a gexp.
Replace call to 'build-expression->derivation' with call to
'gexp->derivation'.
* guix/scripts/package.scm (link-to-empty-profile): Adjust call to
'profile-derivation', and wrap it in 'run-with-store'.
(show-what-to-remove/install): Rename 'path' to 'item'. Check whether
ITEM is a package, and return its output path if it is.
(input->name+path): Remove.
(options->installable): Set 'item' to P.
(guix-package): Adjust call to 'profile-derivation'.
* tests/profiles.scm (guile-2.0.9): Change 'path' to 'item'.
* guix/profiles.scm (manifest=?): Remove.
* guix/scripts/package.scm (readlink*): New procedure.
(guix-package)[process-actions]: Use 'readlink*' and compare the
profile to be built, PROF, with PROFILE to determine whether there's
nothing to be done.
Suggested by Mark H. Weaver.
* gnu/system/shadow.scm (<user-group>)[system?]: New field.
(%base-groups): Introduce 'system-group' macro, and use it.
* gnu/system.scm (user-group->gexp): Pass the 'system?' field.
* guix/build/activation.scm (add-group): Add #:system? and honor it.
(activate-users+groups): Handle the 'system?' field.
* gnu/system/file-systems.scm (%tty-gid): Choose an ID below 1000.
* doc/guix.texi (User Accounts): Document the 'system?' field.
Partly fixes <http://bugs.gnu.org/18082>.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/scripts/system.scm (save-environment-excursion): New macro.
(switch-to-system): Wrap 'primitive-load' call in it.
Partly fixes <http://bugs.gnu.org/18082>.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/scripts/system.scm (perform-action) <reconfigure>: Pass the
output file name of GRUB.CFG to 'install-grub'.
* guix/build/linux-initrd.scm (MS_NOSUID, MS_NODEV, MS_NOEXEC): New
variables.
(mount-flags->bit-mask): New procedure.
(mount-file-system)[flags->bit-mask]: Remove.
Use 'mount-flags->bit-mask' instead.
In /etc/mtab, use the empty string when OPTIONS is false.
* gnu/services/base.scm (file-system-service): Add #:flags parameter and
honor it.
* gnu/system.scm (other-file-system-services): Pass FLAGS to
'file-system-service'.
Fixes <http://bugs.gnu.org/18049>.
Reported by Marek Benc <merkur32@gmail.com>.
* guix/scripts/system.scm (copy-closure): Pass #:state-directory to
'register-path'.
* nix/guix-register/guix-register.cc (GUIX_OPT_STATE_DIRECTORY): New
macro.
(parse_opt): Honor it.
* tests/guix-register.sh: Add test with '--state-directory'.
* guix/store.scm (register-path): Add #:state-directory parameter.
* guix/records.scm (define-record-type*)[record-inheritance]: Check for
unexpected field names.
* tests/records.scm ("define-record-type* with let* behavior"): Return
#t, not *unspecified*.
("define-record-type* & inherit & extra initializers"): New test.