From 612ec252564dd38bc29fb99e0cdfb042001d7dfa Mon Sep 17 00:00:00 2001 From: Kovacsics Robert Date: Thu, 21 May 2020 23:52:01 +0100 Subject: guile: setup hook, use compiled files Often packages install the compiled files to `$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/ccache` (e.g. see guile-opengl). This path is not explicitly given in the info page, but is used in a couple of places, and is also part of `%load-compiled-path` variable in guile (for `"${guile}/lib/guile/2.2/ccache`). Similarly, the site-ccache is also part of `%load-compiled-path` in guile. --- pkgs/development/interpreters/guile/setup-hook-2.0.sh | 10 ++++++++++ pkgs/development/interpreters/guile/setup-hook-2.2.sh | 10 ++++++++++ 2 files changed, 20 insertions(+) (limited to 'pkgs/development/interpreters/guile') diff --git a/pkgs/development/interpreters/guile/setup-hook-2.0.sh b/pkgs/development/interpreters/guile/setup-hook-2.0.sh index 6bb3910aaff4..288f7e242f98 100644 --- a/pkgs/development/interpreters/guile/setup-hook-2.0.sh +++ b/pkgs/development/interpreters/guile/setup-hook-2.0.sh @@ -8,6 +8,16 @@ addGuileLibPath () { 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 + + if test -d "$1/lib/guile/2.0/ccache" + then + export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.0/ccache" + fi + + if test -d "$1/lib/guile/2.0/site-ccache" + then + export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.0/site-ccache" + fi } addEnvHooks "$hostOffset" addGuileLibPath diff --git a/pkgs/development/interpreters/guile/setup-hook-2.2.sh b/pkgs/development/interpreters/guile/setup-hook-2.2.sh index 4b3541fcc7f0..1430dbe07205 100644 --- a/pkgs/development/interpreters/guile/setup-hook-2.2.sh +++ b/pkgs/development/interpreters/guile/setup-hook-2.2.sh @@ -8,6 +8,16 @@ addGuileLibPath () { 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 + + if test -d "$1/lib/guile/2.2/ccache" + then + export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.2/ccache" + fi + + if test -d "$1/lib/guile/2.2/site-ccache" + then + export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.2/site-ccache" + fi } addEnvHooks "$hostOffset" addGuileLibPath -- cgit v1.2.3