diff options
Diffstat (limited to '')
-rw-r--r-- | default.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/default.nix b/default.nix index 73021ff..a8c75d8 100644 --- a/default.nix +++ b/default.nix @@ -53,4 +53,15 @@ let drv = variant (haskellPackages.callPackage f {}); -in drv + # this removes the /lib directory from the built derivation, which depends on ghc. + # this dramatically reduces closure size + stripLib = drv: pkgs.stdenv.mkDerivation { + name = drv.name + "-without-lib"; + src = drv.outPath; + buildPhase = '' + mkdir -p $out + cp -r $src/bin $out + ''; + phases = [ "buildPhase" ]; + }; +in stripLib drv |