distro: automake: Update to 1.12.6.
[jackhill/guix/guix.git] / pre-inst-env.in
CommitLineData
f4544767
LC
1#!/bin/sh
2
3# Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
4# Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
5#
6# This file is part of Guix.
7#
8# Guix is free software; you can redistribute it and/or modify it
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#
13# Guix is distributed in the hope that it will be useful, but
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
19# along with Guix. If not, see <http://www.gnu.org/licenses/>.
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
LC
29
30# Define $PATH so that `guix-build' and friends are easily found.
31
32PATH="@abs_top_builddir@:$PATH"
33export PATH
34
35# The following variables need only be defined when compiling Guix
36# modules, but we define them to be on the safe side in case of
37# auto-compilation.
38
39NIX_HASH="@NIX_HASH@"
f4544767 40
00e219d1 41export NIX_HASH
f4544767
LC
42
43exec "$@"