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.
main
Michael Auchter 2 years ago
parent f514ac5a4a
commit 8ecf252eda
  1. 1
      pkgs/development/compilers/hare/hare.nix
  2. 9
      pkgs/development/compilers/hare/setup-hook.sh

@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
qbe
];
setupHook = ./setup-hook.sh;
strictDeps = true;
configurePhase =

@ -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…
Cancel
Save