about summary refs log tree commit diff
path: root/pkgs/development/interpreters/guile/setup-hook-2.2.sh
diff options
context:
space:
mode:
authorKovacsics Robert <rmk35@cam.ac.uk>2020-05-21 23:52:01 +0100
committerAndreas Rammhold <andreas@rammhold.de>2020-11-28 11:16:25 +0100
commit612ec252564dd38bc29fb99e0cdfb042001d7dfa (patch)
treee2433fba5cd7465766c01d82e20c9321132b5c1b /pkgs/development/interpreters/guile/setup-hook-2.2.sh
parent136152af802a35905924cbb30739b2649423da97 (diff)
downloadnixlib-612ec252564dd38bc29fb99e0cdfb042001d7dfa.tar
nixlib-612ec252564dd38bc29fb99e0cdfb042001d7dfa.tar.gz
nixlib-612ec252564dd38bc29fb99e0cdfb042001d7dfa.tar.bz2
nixlib-612ec252564dd38bc29fb99e0cdfb042001d7dfa.tar.lz
nixlib-612ec252564dd38bc29fb99e0cdfb042001d7dfa.tar.xz
nixlib-612ec252564dd38bc29fb99e0cdfb042001d7dfa.tar.zst
nixlib-612ec252564dd38bc29fb99e0cdfb042001d7dfa.zip
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.
Diffstat (limited to 'pkgs/development/interpreters/guile/setup-hook-2.2.sh')
-rw-r--r--pkgs/development/interpreters/guile/setup-hook-2.2.sh10
1 files changed, 10 insertions, 0 deletions
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