mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 05:00:16 +00:00
SLIB: Add setup hook.
svn path=/nixpkgs/trunk/; revision=17548
This commit is contained in:
parent
b3cff1d812
commit
35ae15d5fa
|
@ -27,12 +27,14 @@ stdenv.mkDerivation rec {
|
|||
SCHEME_LIBRARY_PATH="$out/lib/slib" make catalogs
|
||||
|
||||
sed -i "$out/bin/slib" \
|
||||
-e "/^SCHEME_LIBRARY_PATH/i export PATH=\"${scheme}/bin:$PATH\""
|
||||
-e "/^SCHEME_LIBRARY_PATH/i export PATH=\"${scheme}/bin:\$PATH\""
|
||||
'';
|
||||
|
||||
# There's no test suite (?!).
|
||||
doCheck = false;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
description = "The SLIB Portable Scheme Library";
|
||||
|
||||
|
|
13
pkgs/development/libraries/slib/setup-hook.sh
Normal file
13
pkgs/development/libraries/slib/setup-hook.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
}
|
||||
|
||||
envHooks=(${envHooks[@]} addSlibPath)
|
Loading…
Reference in a new issue