diff options
Diffstat (limited to 'pkgs/development/haskell-modules/lib/compose.nix')
-rw-r--r-- | pkgs/development/haskell-modules/lib/compose.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/development/haskell-modules/lib/compose.nix b/pkgs/development/haskell-modules/lib/compose.nix index 492091ef35fc2..09de1d228d942 100644 --- a/pkgs/development/haskell-modules/lib/compose.nix +++ b/pkgs/development/haskell-modules/lib/compose.nix @@ -292,7 +292,7 @@ rec { */ justStaticExecutables = overrideCabal (drv: { enableSharedExecutables = false; - enableLibraryProfiling = false; + enableLibraryProfiling = drv.enableExecutableProfiling or false; isLibrary = false; doHaddock = false; postFixup = drv.postFixup or "" + '' @@ -345,14 +345,14 @@ rec { , ignorePackages ? [] } : drv : overrideCabal (_drv: { - postBuild = with lib; - let args = concatStringsSep " " ( - optional ignoreEmptyImports "--ignore-empty-imports" ++ - optional ignoreMainModule "--ignore-main-module" ++ + postBuild = + let args = lib.concatStringsSep " " ( + lib.optional ignoreEmptyImports "--ignore-empty-imports" ++ + lib.optional ignoreMainModule "--ignore-main-module" ++ map (pkg: "--ignore-package ${pkg}") ignorePackages ); in "${pkgs.haskellPackages.packunused}/bin/packunused" + - optionalString (args != "") " ${args}"; + lib.optionalString (args != "") " ${args}"; }) (appendConfigureFlag "--ghc-option=-ddump-minimal-imports" drv); buildStackProject = pkgs.callPackage ../generic-stack-builder.nix { }; |