From 0e1dfe702d28df2842aef1c9b8e83a36d4fe1b54 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 28 Mar 2013 12:58:10 +0100 Subject: [PATCH] pkgs/build-support/cabal: strip unnecessary --extra-lib-dir arguments for haskell packages Packages that are registered in the ghc-pkg database don't need any extra flags passed for Cabal to recognize them. --- pkgs/build-support/cabal/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index 765beceb2a4..6d615e1d0c8 100644 --- a/pkgs/build-support/cabal/default.nix +++ b/pkgs/build-support/cabal/default.nix @@ -115,7 +115,9 @@ fi for d in lib{,64}; do if [ -d "$p/$d" ]; then - extraConfigureFlags+=" --extra-lib-dir=$p/$d" + if [ ! -d "$p/$d/ghc-pkgs" ]; then + extraConfigureFlags+=" --extra-lib-dir=$p/$d" + fi fi done done