2012-10-04 23:12:15 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-01-06 00:47:50 +01:00
|
|
|
# GNU Guix --- Functional package management for GNU
|
2013-02-11 23:26:00 +01:00
|
|
|
# Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
2012-10-04 23:12:15 +02:00
|
|
|
#
|
2013-01-06 00:47:50 +01:00
|
|
|
# This file is part of GNU Guix.
|
2012-10-04 23:12:15 +02:00
|
|
|
#
|
2013-01-06 00:47:50 +01:00
|
|
|
# GNU Guix is free software; you can redistribute it and/or modify it
|
2012-10-04 23:12:15 +02:00
|
|
|
# under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
# your option) any later version.
|
|
|
|
#
|
2013-01-06 00:47:50 +01:00
|
|
|
# GNU Guix is distributed in the hope that it will be useful, but
|
2012-10-04 23:12:15 +02:00
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2013-01-06 00:47:50 +01:00
|
|
|
# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
2012-10-04 23:12:15 +02:00
|
|
|
|
|
|
|
# Usage: ./pre-inst-env COMMAND ARG...
|
|
|
|
#
|
|
|
|
# Run COMMAND in a pre-installation environment. Typical use is
|
|
|
|
# "./pre-inst-env guix-build hello".
|
|
|
|
|
|
|
|
GUILE_LOAD_COMPILED_PATH="@abs_top_builddir@${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
|
2012-11-25 16:28:52 +01:00
|
|
|
GUILE_LOAD_PATH="@abs_top_builddir@:@abs_top_srcdir@${GUILE_LOAD_PATH:+:}:$GUILE_LOAD_PATH"
|
2012-10-17 21:44:25 +02:00
|
|
|
export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
|
2012-10-04 23:12:15 +02:00
|
|
|
|
|
|
|
# Define $PATH so that `guix-build' and friends are easily found.
|
|
|
|
|
|
|
|
PATH="@abs_top_builddir@:$PATH"
|
|
|
|
export PATH
|
|
|
|
|
2013-02-11 23:26:00 +01:00
|
|
|
# Daemon helpers.
|
|
|
|
|
|
|
|
NIX_ROOT_FINDER="@abs_top_builddir@/nix/scripts/list-runtime-roots"
|
|
|
|
NIX_SETUID_HELPER="@abs_top_builddir@/nix-setuid-helper"
|
|
|
|
export NIX_ROOT_FINDER NIX_SETUID_HELPER
|
|
|
|
|
2012-10-04 23:12:15 +02:00
|
|
|
# The following variables need only be defined when compiling Guix
|
|
|
|
# modules, but we define them to be on the safe side in case of
|
|
|
|
# auto-compilation.
|
|
|
|
|
|
|
|
NIX_HASH="@NIX_HASH@"
|
|
|
|
|
2012-11-03 21:07:52 +01:00
|
|
|
export NIX_HASH
|
2012-10-04 23:12:15 +02:00
|
|
|
|
|
|
|
exec "$@"
|