summaryrefslogtreecommitdiff
path: root/build-aux/pre-inst-env.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-09 16:35:41 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-09 16:35:41 +0100
commite90e0fad1b3ba79d81f02424e143ee6f4f736e8b (patch)
tree2c26190fd9114199b0ef79303e18a61100cab4af /build-aux/pre-inst-env.in
parent8ea0700d231a8819fc7e8332e9685f0ce15c174e (diff)
parent9ec2a4d3fec44f08a55df9f5f3d1a04b83e7fcf6 (diff)
downloadguix-patches-e90e0fad1b3ba79d81f02424e143ee6f4f736e8b.tar
guix-patches-e90e0fad1b3ba79d81f02424e143ee6f4f736e8b.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'build-aux/pre-inst-env.in')
-rw-r--r--build-aux/pre-inst-env.in15
1 files changed, 11 insertions, 4 deletions
diff --git a/build-aux/pre-inst-env.in b/build-aux/pre-inst-env.in
index fe56da6944..dca2699687 100644
--- a/build-aux/pre-inst-env.in
+++ b/build-aux/pre-inst-env.in
@@ -1,7 +1,7 @@
#!/bin/sh
# GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -45,11 +45,18 @@ export PATH
NIX_ROOT_FINDER="$abs_top_builddir/nix/scripts/list-runtime-roots"
NIX_SUBSTITUTERS="$abs_top_builddir/nix/scripts/substitute"
-NIX_BUILD_HOOK="$abs_top_builddir/nix/scripts/offload"
NIX_LIBEXEC_DIR="@abs_top_builddir@/nix/scripts" # for 'guix-authenticate'
-export NIX_ROOT_FINDER NIX_SUBSTITUTERS \
- NIX_BUILD_HOOK NIX_LIBEXEC_DIR
+export NIX_ROOT_FINDER NIX_SUBSTITUTERS NIX_LIBEXEC_DIR
+
+NIX_BUILD_HOOK="$abs_top_builddir/nix/scripts/offload"
+if [ -x "$NIX_BUILD_HOOK" ]
+then
+ export NIX_BUILD_HOOK
+else
+ # No offloading support.
+ unset NIX_BUILD_HOOK
+fi
# The 'guix-register' program.
GUIX_REGISTER="$abs_top_builddir/guix-register"