hare: add setupHook to configure HAREPATH
Add a setupHook so the HAREPATH environment variable is correctly set to point to the hare stdlib and any third-party libraries.
This commit is contained in:
parent
f514ac5a4a
commit
8ecf252eda
|
@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
|
|||
qbe
|
||||
];
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
strictDeps = true;
|
||||
|
||||
configurePhase =
|
||||
|
|
9
pkgs/development/compilers/hare/setup-hook.sh
Normal file
9
pkgs/development/compilers/hare/setup-hook.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
addHarepath () {
|
||||
for haredir in third-party stdlib; do
|
||||
if [[ -d "$1/src/hare/$haredir" ]]; then
|
||||
addToSearchPath HAREPATH "$1/src/hare/$haredir"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
addEnvHooks "$hostOffset" addHarepath
|
Loading…
Reference in a new issue