diff options
author | stuebinm | 2022-12-05 16:18:40 +0100 |
---|---|---|
committer | stuebinm | 2022-12-05 16:18:40 +0100 |
commit | d8da28c5d80d2976f5a607013b272b960c0fcdbe (patch) | |
tree | 61232248487f91e6d41d20237d3f5e9f451be0ee | |
parent | 7ff2ce995b0b71d2e058a0e1449d70ecf19c56d9 (diff) |
reduce closure size
-rw-r--r-- | default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/default.nix b/default.nix index bc7afc9..1fddd9f 100644 --- a/default.nix +++ b/default.nix @@ -2,6 +2,16 @@ {pkgs ? import (import ./nix/sources.nix).nixpkgs {}}: let + # get rid of implicit dependency on gcc & ghc + stripLib = drv: pkgs.stdenv.mkDerivation { + name = drv.name + "-without-lib"; + src = drv.outPath; + buildPhase = '' + mkdir -p $out + cp -r $src/bin $out + ''; + phases = [ "buildPhase" ]; + }; defaultcards = pkgs.copyPathToStore ./cards.yaml; drvs = with pkgs; rec { @@ -66,5 +76,5 @@ let }; in with pkgs.lib; rec { client = callPackageWith { inherit server; } drvs.uplcg-client {}; - server = pkgs.haskellPackages.callPackage drvs.uplcg-server {}; + server = stripLib (pkgs.haskellPackages.callPackage drvs.uplcg-server {}); } |