nixpkgs/pkgs/development/libraries/slib/setup-hook.sh
John Ericson 046f091e0d treewide: Don't use envHook anymore
This commits needs a MAJOR audit as I oftentimes just guessed which of
`$hostOffset`, `$targetOffset`, or a fixed offset should be used.
2017-12-30 22:04:22 -05:00

14 lines
424 B
Bash

addSlibPath () {
if test -f "$1/lib/slib/slibcat"
then
export SCHEME_LIBRARY_PATH="$1/lib/slib/"
echo "SLIB found in \`$1'; setting \$SCHEME_LIBRARY_PATH to \`$SCHEME_LIBRARY_PATH'"
# This is needed so that `(load-from-path "slib/guile.init")' works.
export GUILE_LOAD_PATH="$1/lib:$GUILE_LOAD_PATH"
echo "SLIB: setting \$GUILE_LOAD_PATH to \`$GUILE_LOAD_PATH'"
fi
}
addEnvHooks "$hostOffset" addSlibPath