summaryrefslogtreecommitdiffstats
path: root/pkgs/development/interpreters/guile
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
parent136152af802a35905924cbb30739b2649423da97 (diff)
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')
-rw-r--r--pkgs/development/interpreters/guile/setup-hook-2.0.sh10
-rw-r--r--pkgs/development/interpreters/guile/setup-hook-2.2.sh10
2 files changed, 20 insertions, 0 deletions
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