From 24d313e2039b6d89f8a1ba4c5be12b134479fe67 Mon Sep 17 00:00:00 2001 From: michael bishop Date: Wed, 14 Jun 2017 11:41:00 -0300 Subject: [PATCH] justStaticExecutables: enable -dead_strip on mac to shrink closure --- pkgs/development/haskell-modules/lib.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix index 6c718bafda55..30d82d3efc93 100644 --- a/pkgs/development/haskell-modules/lib.nix +++ b/pkgs/development/haskell-modules/lib.nix @@ -89,7 +89,10 @@ rec { isLibrary = false; doHaddock = false; postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc"; - }); + } // (if pkgs.stdenv.isDarwin then { + configureFlags = (drv.configureFlags or []) ++ ["--ghc-option=-optl=-dead_strip"]; + } else {}) + ); buildFromSdist = pkg: pkgs.lib.overrideDerivation pkg (drv: { unpackPhase = let src = sdistTarball pkg; tarname = "${pkg.pname}-${pkg.version}"; in ''