2012-10-04 17:12:15 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-01-05 18:47:50 -05:00
|
|
|
# GNU Guix --- Functional package management for GNU
|
|
|
|
# Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
|
2012-10-04 17:12:15 -04:00
|
|
|
#
|
2013-01-05 18:47:50 -05:00
|
|
|
# This file is part of GNU Guix.
|
2012-10-04 17:12:15 -04:00
|
|
|
#
|
2013-01-05 18:47:50 -05:00
|
|
|
# GNU Guix is free software; you can redistribute it and/or modify it
|
2012-10-04 17:12:15 -04: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-05 18:47:50 -05:00
|
|
|
# GNU Guix is distributed in the hope that it will be useful, but
|
2012-10-04 17:12:15 -04: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-05 18:47:50 -05:00
|
|
|
# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
2012-10-04 17:12:15 -04: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 10:28:52 -05:00
|
|
|
GUILE_LOAD_PATH="@abs_top_builddir@:@abs_top_srcdir@${GUILE_LOAD_PATH:+:}:$GUILE_LOAD_PATH"
|
2012-10-17 15:44:25 -04:00
|
|
|
export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
|
2012-10-04 17:12:15 -04:00
|
|
|
|
|
|
|
# Define $PATH so that `guix-build' and friends are easily found.
|
|
|
|
|
|
|
|
PATH="@abs_top_builddir@:$PATH"
|
|
|
|
export PATH
|
|
|
|
|
|
|
|
# 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 16:07:52 -04:00
|
|
|
export NIX_HASH
|
2012-10-04 17:12:15 -04:00
|
|
|
|
|
|
|
exec "$@"
|