about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/haskell-modules/stack-hook.sh
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-03-16 17:16:21 +0000
committerAlyssa Ross <hi@alyssa.is>2019-03-16 22:36:36 +0000
commitcb6d0ec12187e0c2c11b203f3d8fa62790628141 (patch)
tree0ca0fedc67d5676e89438cffa3e0865eee0962e4 /nixpkgs/pkgs/development/haskell-modules/stack-hook.sh
parent4d83b8e578d3a0b78d2694921c944172b009036a (diff)
parentda1a2b1eeafa66b4419b4f275396d8a731eccb61 (diff)
downloadnixlib-cb6d0ec12187e0c2c11b203f3d8fa62790628141.tar
nixlib-cb6d0ec12187e0c2c11b203f3d8fa62790628141.tar.gz
nixlib-cb6d0ec12187e0c2c11b203f3d8fa62790628141.tar.bz2
nixlib-cb6d0ec12187e0c2c11b203f3d8fa62790628141.tar.lz
nixlib-cb6d0ec12187e0c2c11b203f3d8fa62790628141.tar.xz
nixlib-cb6d0ec12187e0c2c11b203f3d8fa62790628141.tar.zst
nixlib-cb6d0ec12187e0c2c11b203f3d8fa62790628141.zip
Merge commit 'da1a2b1eeafa66b4419b4f275396d8a731eccb61'
Diffstat (limited to 'nixpkgs/pkgs/development/haskell-modules/stack-hook.sh')
-rw-r--r--nixpkgs/pkgs/development/haskell-modules/stack-hook.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/haskell-modules/stack-hook.sh b/nixpkgs/pkgs/development/haskell-modules/stack-hook.sh
index d942662294c2..44c184a5624a 100644
--- a/nixpkgs/pkgs/development/haskell-modules/stack-hook.sh
+++ b/nixpkgs/pkgs/development/haskell-modules/stack-hook.sh
@@ -1,11 +1,11 @@
 addStackArgs () {
-  if [ -d "$1/lib" ] && [[ "$STACK_IN_NIX_EXTRA_ARGS" != *"--extra-lib-dirs=$1/lib"* ]]; then
+  if [ -n "$(echo $1/lib/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
+  if [ -d "$1/include" ]; then
     STACK_IN_NIX_EXTRA_ARGS+=" --extra-include-dirs=$1/include"
   fi
 }
 
-addEnvHooks "$hostOffset" addStackArgs
+addEnvHooks "$targetOffset" addStackArgs