# `pre-inst-env'. This is used to run unit tests with the just-built
# daemon, unless `--disable-daemon' was passed at configure time.
+
+# Make sure 'cd' behaves deterministically and doesn't write anything to
+# stdout.
+unset CDPATH
+
if [ -x "@abs_top_builddir@/guix-daemon" ]
then
NIX_SETUID_HELPER="@abs_top_builddir@/nix-setuid-helper" # normally unused
# Launch the daemon without chroot support because is may be
# unavailable, for instance if we're not running as root.
"@abs_top_builddir@/pre-inst-env" \
- "@abs_top_builddir@/guix-daemon" --disable-chroot &
+ "@abs_top_builddir@/guix-daemon" --disable-chroot \
+ --substitute-urls="$GUIX_BINARY_SUBSTITUTE_URL" &
daemon_pid=$!
trap "kill $daemon_pid ; rm -rf $NIX_STATE_DIR" EXIT
fi
+# Avoid issues that could stem from l10n, such as language/encoding
+# mismatches.
+unset LANGUAGE
+LC_MESSAGES=C
+export LC_MESSAGES
+
+# Ignore user settings.
+unset GUIX_PACKAGE_PATH GUIX_BUILD_OPTIONS
+
storedir="@storedir@"
prefix="@prefix@"
datarootdir="@datarootdir@"