default.nix: expose functionality: checkUnusedPackages; provide doc

M  default.nix
This commit is contained in:
Anton-Latukha 2020-06-03 20:42:18 +03:00
parent 446372aaa5
commit 11151294d2
No known key found for this signature in database
GPG key ID: 3D84C07E91802E41

View file

@ -37,6 +37,8 @@
, enableSharedExecutables ? false , enableSharedExecutables ? false
, justStaticExecutables ? false , justStaticExecutables ? false
, enableSeparateBinOutput ? false , enableSeparateBinOutput ? false
# Add a post-build check to verify that dependencies declared in the .cabal file are actually used.
, checkUnusedPackages ? false
# Generation and installation of haddock API documentation # Generation and installation of haddock API documentation
, doHaddock ? false , doHaddock ? false
# Generation and installation of a coverage report. See https://wiki.haskell.org/Haskell_program_coverage # Generation and installation of a coverage report. See https://wiki.haskell.org/Haskell_program_coverage
@ -174,6 +176,10 @@ let
switch = justStaticExecutables; switch = justStaticExecutables;
function = pkgs.haskell.lib.justStaticExecutables; function = pkgs.haskell.lib.justStaticExecutables;
} }
{
switch = checkUnusedPackages;
function = pkgs.haskell.lib.checkUnusedPackages {};
}
]; ];
funcOnSwitchAppliesFunction = set: object: funcOnSwitchAppliesFunction = set: object: