3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/haskell-modules/stack-hook.sh

12 lines
391 B
Bash
Raw Normal View History

addStackArgs () {
if [ -d "$1/lib" ] && [[ "$STACK_IN_NIX_EXTRA_ARGS" != *"--extra-lib-dirs=$1/lib"* ]]; then
STACK_IN_NIX_EXTRA_ARGS+=" --extra-lib-dirs=$1/lib"
fi
if [ -d "$1/include" ] && [[ "$STACK_IN_NIX_EXTRA_ARGS" != *"--extra-include-dirs=$1/include"* ]]; then
STACK_IN_NIX_EXTRA_ARGS+=" --extra-include-dirs=$1/include"
fi
}
addEnvHooks "$hostOffset" addStackArgs