build: Set 'NIX_BUILD_HOOK' only if offloading is configured.

This prevents libstore/build.cc from executing nix/scripts/offload, which is
always created by config.status, when offload support is not enabled.

* build-aux/pre-inst-env.in: Export 'NIX_BUILD_HOOK' only when
configured; unset it otherwise.
This commit is contained in:
Eric Bavier 2017-10-10 22:29:50 -05:00 committed by Eric Bavier
parent c3bece41b7
commit 7740228e35
No known key found for this signature in database
GPG Key ID: FD73CAC719D32566
1 changed files with 4 additions and 7 deletions

View File

@ -2,6 +2,7 @@
# GNU Guix --- Functional package management for GNU # GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org> # Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2017 Eric Bavier <bavier@cray.com>
# #
# This file is part of GNU Guix. # This file is part of GNU Guix.
# #
@ -50,13 +51,9 @@ NIX_LIBEXEC_DIR="@abs_top_builddir@/nix/scripts" # for 'guix-authenticate'
export NIX_ROOT_FINDER NIX_SUBSTITUTERS NIX_LIBEXEC_DIR export NIX_ROOT_FINDER NIX_SUBSTITUTERS NIX_LIBEXEC_DIR
NIX_BUILD_HOOK="$abs_top_builddir/nix/scripts/offload" NIX_BUILD_HOOK="$abs_top_builddir/nix/scripts/offload"
if [ -x "$NIX_BUILD_HOOK" ] @BUILD_DAEMON_OFFLOAD_TRUE@export NIX_BUILD_HOOK
then @BUILD_DAEMON_OFFLOAD_FALSE@# No offloading support.
export NIX_BUILD_HOOK @BUILD_DAEMON_OFFLOAD_FALSE@unset NIX_BUILD_HOOK
else
# No offloading support.
unset NIX_BUILD_HOOK
fi
# The 'guix-register' program. # The 'guix-register' program.
GUIX_REGISTER="$abs_top_builddir/guix-register" GUIX_REGISTER="$abs_top_builddir/guix-register"