aboutsummaryrefslogtreecommitdiff
path: root/nix/nix-daemon
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-04-02 10:44:20 +0200
committerLudovic Courtès <ludo@gnu.org>2013-04-12 21:57:58 +0200
commit419fffa2e84bdcfee13572e1b346a7487926113d (patch)
tree2f072c3072184eeacf19558a1b5e8e7ff03c1b38 /nix/nix-daemon
parent04151253e3de87059f9e1a0794a8667b49095917 (diff)
downloadguix-419fffa2e84bdcfee13572e1b346a7487926113d.tar.gz
guix-419fffa2e84bdcfee13572e1b346a7487926113d.zip
Add preliminary binary substituter.
* guix/scripts/substitute-binary.scm: New file. * Makefile.am (MODULES): Add it. * nix/scripts/substitute-binary.in: New file. * config-daemon.ac: Produce nix/scripts/substitute-binary. * daemon.am (nodist_pkglibexec_SCRIPTS): Add nix/scripts/substitute-binary. * guix/store.scm (substitutable-path-info): Use the `query-substitutable-path-infos' RPC. * nix/nix-daemon/guix-daemon.cc (main): Honor `NIX_SUBSTITUTERS'. * pre-inst-env.in: Set `NIX_SUBSTITUTERS'. * test-env.in: Leave `NIX_SUBSTITUTERS' unchanged. Set `GUIX_BINARY_SUBSTITUTE_URL, and create $NIX_STATE_DIR/substituter-data. Run `guix-daemon' within `./pre-inst-env'. * tests/store.scm ("substitute query"): New test.
Diffstat (limited to 'nix/nix-daemon')
-rw-r--r--nix/nix-daemon/guix-daemon.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc
index 1611840bd4..0e2f36150b 100644
--- a/nix/nix-daemon/guix-daemon.cc
+++ b/nix/nix-daemon/guix-daemon.cc
@@ -200,9 +200,17 @@ main (int argc, char *argv[])
{
settings.processEnvironment ();
- /* FIXME: Disable substitutes until we have something that works. */
- settings.useSubstitutes = false;
+ /* Use our substituter by default. */
settings.substituters.clear ();
+ string subs = getEnv ("NIX_SUBSTITUTERS", "default");
+ if (subs == "default")
+ /* XXX: No substituters until we have something that works. */
+ settings.substituters.clear ();
+ // settings.substituters.push_back (settings.nixLibexecDir
+ // + "/guix/substitute-binary");
+ else
+ settings.substituters = tokenizeString<Strings> (subs, ":");
+
argp_parse (&argp, argc, argv, 0, 0, 0);