From 801c82da559304a0c8028d59bec30d504310bcae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 22 May 2012 21:18:20 +0000 Subject: [PATCH] GNU Guile 2.0: Provide a 2.0ish setup hook. svn path=/nixpkgs/trunk/; revision=34215 --- pkgs/development/interpreters/guile/default.nix | 2 +- .../interpreters/guile/setup-hook-2.0.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/interpreters/guile/setup-hook-2.0.sh 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)