* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_NO_BUILD_HOOK): New macro.
(options): Add '--no-build-hook'.
(parse_opt): Handle it.
(main)[HAVE_DAEMON_OFFLOAD_HOOK]: Set 'useBuildHook' by default.
Set $NIX_BUILD_HOOK to our offload hook unless otherwise specified.
[!HAVE_DAEMON_OFFLOAD_HOOK]: Clear 'useBuildHook'.
* pre-inst-env.in: Set and export NIX_BUILD_HOOK.
* nix/scripts/offload.in, guix/scripts/offload.scm: New files.
* guix/ui.scm (show-guix-help)[internal?]: Add "offload".
* config-daemon.ac: Call 'GUIX_CHECK_UNBUFFERED_CBIP'.
Instantiate 'nix/scripts/offload'. Set 'BUILD_DAEMON_OFFLOAD'
conditional, and optionally define 'HAVE_DEAMON_OFFLOAD_HOOK' cpp
macro.
* daemon.am (nodist_pkglibexec_SCRIPTS)[BUILD_DAEMON_OFFLOAD]: Add it.
* Makefile.am (MODULES)[BUILD_DAEMON_OFFLOAD]: Add
'guix/scripts/offload.scm'.
(EXTRA_DIST)[!BUILD_DAEMON_OFFLOAD]: Likewise.
* m4/guix.m4 (GUIX_CHECK_UNBUFFERED_CBIP): New macro.
* doc/guix.texi (Setting Up the Daemon): Move most of the body to...
(Build Environment Setup): ... this. New subsection.
(Daemon Offload Setup): New subsection.
* pre-inst-env.in (abs_top_srcdir, abs_top_builddir): New variables.
Use them instead of @abs_top_srcdir@ and @abs_top_builddir@.
This fixes the "package-field-location, relative file name" test in
'make distcheck'.
* 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.
* Makefile.am (patchdir, bootstrapdir): Change to be sub-directories of
$(guilemoduledir).
(.scm.go): Remove `DISTRO_' environment variables.
* distro.scm (not-colon): Remove.
(%patch-path, %bootstrap-binaries-path): Default to sub-directories of
the entries in %LOAD-PATH.
* pre-inst-env.in: Remove definition of `DISTRO_' environment variables.
* distro.scm (not-colon): New variable.
(%patch-directory): Rename to...
(%patch-path): ... this. Turn into a list. Expect $DISTRO_PATCH_PATH
to be a colon-separated search path.
(%bootstrap-binaries-directory): Rename to...
(%bootstrap-binaries-path): ... this. Likewise.
(search-patch, search-bootstrap-binary): Adjust accordingly.
* pre-inst-env.in: Change to use `DISTRO_PATCH_PATH' and
`DISTRO_BOOTSTRAP_PATH'.