gnu: gcc-4.8: Upgrade to 4.8.2.
[jackhill/guix/guix.git] / pre-inst-env.in
CommitLineData
f4544767
LC
1#!/bin/sh
2
233e7676 3# GNU Guix --- Functional package management for GNU
151794bf 4# Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
f4544767 5#
233e7676 6# This file is part of GNU Guix.
f4544767 7#
233e7676 8# GNU Guix is free software; you can redistribute it and/or modify it
f4544767
LC
9# under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 3 of the License, or (at
11# your option) any later version.
12#
233e7676 13# GNU Guix is distributed in the hope that it will be useful, but
f4544767
LC
14# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
233e7676 19# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
f4544767
LC
20
21# Usage: ./pre-inst-env COMMAND ARG...
22#
23# Run COMMAND in a pre-installation environment. Typical use is
24# "./pre-inst-env guix-build hello".
25
f4544767 26GUILE_LOAD_COMPILED_PATH="@abs_top_builddir@${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
0b3651bc 27GUILE_LOAD_PATH="@abs_top_builddir@:@abs_top_srcdir@${GUILE_LOAD_PATH:+:}:$GUILE_LOAD_PATH"
ac5aa288 28export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
f4544767 29
e49951eb 30# Define $PATH so that `guix' and friends are easily found.
f4544767 31
e49951eb 32PATH="@abs_top_builddir@/scripts:@abs_top_builddir@:$PATH"
f4544767
LC
33export PATH
34
151794bf
LC
35# Daemon helpers.
36
37NIX_ROOT_FINDER="@abs_top_builddir@/nix/scripts/list-runtime-roots"
f65cf81a 38NIX_SUBSTITUTERS="@abs_top_builddir@/nix/scripts/substitute-binary"
151794bf 39NIX_SETUID_HELPER="@abs_top_builddir@/nix-setuid-helper"
f65cf81a 40export NIX_ROOT_FINDER NIX_SETUID_HELPER NIX_SUBSTITUTERS
151794bf 41
f4544767
LC
42# The following variables need only be defined when compiling Guix
43# modules, but we define them to be on the safe side in case of
44# auto-compilation.
45
46NIX_HASH="@NIX_HASH@"
00e219d1 47export NIX_HASH
f4544767 48
e49951eb
MW
49# Define $GUIX_UNINSTALLED to prevent `guix' from
50# prepending @guilemoduledir@ to the Guile load paths.
51
52GUIX_UNINSTALLED=1
53export GUIX_UNINSTALLED
54
f4544767 55exec "$@"