#!/bin/sh # GNU Guix --- Functional package management for GNU # Copyright © 2012, 2013, 2014, 2015, 2017, 2018, 2019 Ludovic Courtès # Copyright © 2017 Eric Bavier # # This file is part of GNU Guix. # # GNU Guix is free software; you can redistribute it and/or modify it # 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. # # GNU Guix is distributed in the hope that it will be useful, but # 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 # along with GNU Guix. If not, see . # Usage: ./pre-inst-env COMMAND ARG... # # Run COMMAND in a pre-installation environment. Typical use is # "./pre-inst-env guix build hello". # By default we may end up with absolute directory names that contain '..', # which get into $GUILE_LOAD_PATH, leading to '..' in the module file names # recorded by Guile. To avoid that, make sure we get a real absolute # directory name. Additionally, use '-P' to get the canonical directory name # so that Guile's 'relative' %file-port-name-canonicalization can actually # work (see .) abs_top_srcdir="`cd "@abs_top_srcdir@" > /dev/null; pwd -P`" abs_top_builddir="`cd "@abs_top_builddir@" > /dev/null; pwd -P`" GUILE_LOAD_COMPILED_PATH="$abs_top_builddir${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH" GUILE_LOAD_PATH="$abs_top_builddir:$abs_top_srcdir${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH" export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH # Define $PATH so that `guix' and friends are easily found. PATH="$abs_top_builddir/scripts:$abs_top_builddir:$PATH" export PATH # The daemon invokes 'guix'; tell it which one to use. GUIX="$abs_top_builddir/scripts/guix" export GUIX # 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@" export NIX_HASH # Define $GUIX_UNINSTALLED to prevent `guix' from # prepending @guilemoduledir@ to the Guile load paths. GUIX_UNINSTALLED=1 export GUIX_UNINSTALLED exec "$@" 'cgit-panel'>diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-08-27 00:32:49 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-09-01 00:48:11 -0400
commita02ad4592cc085ca488a5c4c4c352dba5eaa645b (patch)
tree40e8f35d421f53bcbc555ad4f9bb6efd541d9a99 /doc/guix.texi
parent1c4b3512db48a34aa5e7993167aa70a3124cdf34 (diff)
downloadguix-a02ad4592cc085ca488a5c4c4c352dba5eaa645b.tar.gz
guix-a02ad4592cc085ca488a5c4c4c352dba5eaa645b.zip
gexp: computed-file: Prevent mistakenly overriding default option values.
In order to do so, default to an empty options list, and expose options whose default values are sensitive directly as keyword arguments. * guix/gexp.scm (computed-file): Extract the LOCAL-BUILD? parameter from the OPTIONS parameter to make it a stand-alone keyword argument. Introduce an OPTIONS* binding which is obtained by combining the LOCAL-BUILD? keyword and its value with OPTIONS. * doc/guix.texi (G-Expressions): Adjust doc. Suggested-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'doc/guix.texi')