guix-devel/guix/scripts
Ludovic Courtès 94d92c7796
daemon: Add "builtin:download" derivation builder.
This ensures that 1) the derivation doesn't change when Guix changes;
2) the derivation closure doesn't contain Guix and its dependencies; 3)
we don't have to rely on ugly chroot hacks.

Adapted from Nix commit 0a2bee307b20411f5b0dda0c662b1f9bb9e0e131.

* nix/libstore/build.cc (DerivationGoal::runChild): Add special case for
'isBuiltin(drv)'.  Disable chroot when 'isBuiltin(drv)'.
* nix/libstore/builtins.cc, nix/libstore/builtins.hh,
nix/scripts/download.in, guix/scripts/perform-download.scm: New files.
* guix/ui.scm (show-guix-help)[internal?]: Add 'perform-download'.
* nix/local.mk (libstore_a_SOURCES): Add builtins.cc.
(libstore_headers): Add builtins.hh.
(nodist_pkglibexec_SCRIPTS): Add 'scripts/download'.
* config-daemon.ac: Emit 'scripts/download'.
* Makefile.am (MODULES): Add 'guix/scripts/perform-download.scm'.
* tests/derivations.scm ("unknown built-in builder")
("'download' built-in builder")
("'download' built-in builder, invalid hash")
("'download' built-in builder, not found")
("'download' built-in builder, not fixed-output"): New tests.

Co-authored-by: Eelco Dolstra <eelco.dolstra@logicblox.com>
2016-11-16 18:19:47 +01:00
..
container scripts: container: Fix 'exec' command line parsing. 2015-11-03 18:05:43 -05:00
import ui: Do not shadow '_' where it's used as a literal syntax match. 2016-09-20 23:22:42 +09:00
archive.scm Use (ice-9 binary-ports) instead of (rnrs io ports). 2016-10-19 15:54:10 +02:00
authenticate.scm Use (ice-9 binary-ports) instead of (rnrs io ports). 2016-10-19 15:54:10 +02:00
build.scm guix build: Add '--with-graft'. 2016-10-17 23:59:02 +02:00
challenge.scm challenge: Disable grafting. 2016-07-14 19:07:07 +02:00
container.scm scripts: Add 'container' subcommand. 2015-11-01 18:20:04 -05:00
download.scm guix download: Add '-o' option. 2016-11-16 18:00:41 +01:00
edit.scm edit: Do not honor 'GUIX_BUILD_OPTIONS'. 2016-08-19 17:34:37 +02:00
environment.scm container: Pass a list of <file-system> objects as things to mount. 2016-11-10 18:01:44 +01:00
gc.scm guix gc: Display of saved space for garbage collection. 2016-07-16 14:41:39 +02:00
graph.scm graph: Add '%referrer-node-type'. 2016-10-15 23:46:39 +02:00
hash.scm guix hash: Interpret '-' as standard input. 2016-10-28 22:30:17 +02:00
import.scm import: Gracefully report import failures. 2016-05-17 14:02:48 +02:00
lint.scm lint: 'cve' checker catches 'tls-certificate-error'. 2016-11-09 21:24:44 +01:00
offload.scm Use (ice-9 binary-ports) instead of (rnrs io ports). 2016-10-19 15:54:10 +02:00
package.scm profiles: Extract a procedure for getting relative generation numbers. 2016-11-06 18:08:53 +01:00
perform-download.scm daemon: Add "builtin:download" derivation builder. 2016-11-16 18:19:47 +01:00
publish.scm Use (ice-9 binary-ports) instead of (rnrs io ports). 2016-10-19 15:54:10 +02:00
pull.scm utils: Add 'switch-symlinks', moved from (guix ui). 2015-10-27 00:01:20 +01:00
refresh.scm Use (ice-9 binary-ports) instead of (rnrs io ports). 2016-10-19 15:54:10 +02:00
size.scm size: Fix corner case with multiple items on the command line. 2016-07-29 22:32:04 +02:00
substitute.scm substitute: Disable HTTPS certificate verification. 2016-11-12 13:04:45 +01:00
system.scm system: Use grub from bootloader configuration. 2016-11-08 14:35:05 +00:00