Skip to content
Permalink
Browse files

Only build static executable in top-level niv attribute

This reduces the closure size by about 2G.
  • Loading branch information
nmattia committed Jan 11, 2020
1 parent d20eed4 commit 461905a70cea0a9f1640accb9a22f42b5a874c52
Showing with 7 additions and 5 deletions.
  1. +7 −5 default.nix
@@ -46,11 +46,13 @@ with rec
haskellPackages = pkgs.haskellPackages.override {
overrides = _: haskellPackages: {
niv =
pkgs.haskell.lib.failOnAllWarnings (
pkgs.haskell.lib.disableExecutableProfiling (
pkgs.haskell.lib.disableLibraryProfiling (
pkgs.haskell.lib.generateOptparseApplicativeCompletion "niv" (
haskellPackages.callCabal2nix "niv" niv-source {}
pkgs.haskell.lib.justStaticExecutables (
pkgs.haskell.lib.failOnAllWarnings (
pkgs.haskell.lib.disableExecutableProfiling (
pkgs.haskell.lib.disableLibraryProfiling (
pkgs.haskell.lib.generateOptparseApplicativeCompletion "niv" (
haskellPackages.callCabal2nix "niv" niv-source {}
)
)
)
)

0 comments on commit 461905a

Please sign in to comment.
You can’t perform that action at this time.