1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00
nixpkgs/pkgs/development/haskell-modules/stack-hook.sh
Matthew Bauer 71f189f26f stack-hook: deduplicate better
No need to check for duplicates as it is now handled by setup.sh
deduplication. Also should use targetOffset here instead of hostOffset
because we are using stack-hook natively.
2019-03-02 02:21:32 -05:00

12 lines
264 B
Bash

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