Skip to content

Commit

Permalink
Only build static executable in top-level niv attribute
Browse files Browse the repository at this point in the history
This reduces the closure size by about 2G.
  • Loading branch information
nmattia committed Jan 11, 2020
1 parent d20eed4 commit 461905a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions default.nix
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ with rec
haskellPackages = pkgs.haskellPackages.override { haskellPackages = pkgs.haskellPackages.override {
overrides = _: haskellPackages: { overrides = _: haskellPackages: {
niv = niv =
pkgs.haskell.lib.failOnAllWarnings ( pkgs.haskell.lib.justStaticExecutables (
pkgs.haskell.lib.disableExecutableProfiling ( pkgs.haskell.lib.failOnAllWarnings (
pkgs.haskell.lib.disableLibraryProfiling ( pkgs.haskell.lib.disableExecutableProfiling (
pkgs.haskell.lib.generateOptparseApplicativeCompletion "niv" ( pkgs.haskell.lib.disableLibraryProfiling (
haskellPackages.callCabal2nix "niv" niv-source {} pkgs.haskell.lib.generateOptparseApplicativeCompletion "niv" (
haskellPackages.callCabal2nix "niv" niv-source {}
)
) )
) )
) )
Expand Down

0 comments on commit 461905a

Please sign in to comment.