You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
1.9 KiB

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