diff options
-rw-r--r-- | pkgs/development/interpreters/guile/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/interpreters/guile/setup-hook-2.0.sh | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index 127e49087d36..ea895fb1186d 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -46,7 +46,7 @@ doCheck = true; - setupHook = ./setup-hook.sh; + setupHook = ./setup-hook-2.0.sh; crossAttrs.preConfigure = stdenv.lib.optionalString (stdenv.cross.config == "i586-pc-gnu") diff --git a/pkgs/development/interpreters/guile/setup-hook-2.0.sh b/pkgs/development/interpreters/guile/setup-hook-2.0.sh new file mode 100644 index 000000000000..6994c4cd8dc6 --- /dev/null +++ b/pkgs/development/interpreters/guile/setup-hook-2.0.sh @@ -0,0 +1,13 @@ +addGuileLibPath () { + if test -d "$1/share/guile/site/2.0" + then + export GUILE_LOAD_PATH="${GUILE_LOAD_PATH}${GUILE_LOAD_PATH:+:}$1/share/guile/site/2.0" + export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/2.0" + elif test -d "$1/share/guile/site" + then + export GUILE_LOAD_PATH="${GUILE_LOAD_PATH}${GUILE_LOAD_PATH:+:}$1/share/guile/site" + export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site" + fi +} + +envHooks=(${envHooks[@]} addGuileLibPath) |