Mirror of GNU Guix
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.

48 lines
1.6 KiB

  1. #!/bin/sh
  2. # Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
  3. # Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
  4. #
  5. # This file is part of Guix.
  6. #
  7. # 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. # 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 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. DISTRO_PATCH_DIRECTORY="@abs_top_srcdir@/distro/patches"
  24. GUILE_LOAD_COMPILED_PATH="@abs_top_builddir@${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
  25. GUILE_LOAD_PATH="@abs_top_srcdir@${GUILE_LOAD_PATH:+:}:$GUILE_LOAD_PATH"
  26. export DISTRO_PATCH_DIRECTORY GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
  27. # Define $PATH so that `guix-build' and friends are easily found.
  28. PATH="@abs_top_builddir@:$PATH"
  29. export PATH
  30. # The following variables need only be defined when compiling Guix
  31. # modules, but we define them to be on the safe side in case of
  32. # auto-compilation.
  33. NIX_HASH="@NIX_HASH@"
  34. NIX_INSTANTIATE="@NIX_INSTANTIATE@"
  35. NIXPKGS="@NIXPKGS@"
  36. LIBGCRYPT="@LIBGCRYPT@"
  37. export NIX_HASH NIX_INSTANTIATE NIXPKGS LIBGCRYPT
  38. exec "$@"