shellFor: Add withHaddocks and fix ghc-pkg reporting no haddocks for dependencies. (#1279)
commite8bfc03091376c2a41817be374b6a6185c7f31c1
authorWill Fancher <elvishjerricco@gmail.com>
dateWed 3 Nov 2021, 05:29 (5 years ago)
parenta5f9ddd
builder/shell-for.nix+2
@@ -13,6 +13,7 @@
1313 # Additional packages to be added unconditionally
1414, additional ? _: []
1515, withHoogle ? true
16+, withHaddock ? withHoogle
1617, exactDeps ? false
1718, tools ? {}
1819, packageSetupDeps ? true
@@ -102,6 +103,7 @@ let
102103 fullName = args.name or name;
103104 identifier.name = name;
104105 inherit component;
106+ chooseDrv = p: if withHaddock && p ? haddock then p.haddock else p;
105107 };
106108 ghcEnv = ghcForComponent {
107109 inherit configFiles;