git.iko.soy/typeable/cabal2nix
on master help sign in
hackage2nix: automatically disable the Haddock documentation when the package exports no modules

Closes https://github.com/NixOS/cabal2nix/issues/45.

commitea90238ed2fc3fd04c01e0fa7b80842f92cf410d authorPeter Simons <simons@cryp.to> dateWed 16 Sep 2015, 15:36 (11 years ago) parent3cb7f9e
2 files changed+3−3
distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/FromCabal.hs+1−1 hackage2nix/src/Main.hs+2−2
distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/FromCabal.hs+1−1
@@ -77,7 +77,7 @@ fromPackageDescription haskellResolver nixpkgsResolver mismatchedDeps missingDep
7777 & testDepends .~ mconcat (map (convertBuildInfo . testBuildInfo) testSuites)
7878 & configureFlags .~ mempty
7979 & cabalFlags .~ flags
80− & runHaddock .~ True
80+ & runHaddock .~ maybe True (not . null . exposedModules) library
8181 & jailbreak .~ not (null mismatchedDeps && null missingDeps)
8282 & doCheck .~ True
8383 & testTarget .~ mempty
hackage2nix/src/Main.hs+2−2
@@ -168,8 +168,8 @@ main = do
168168 drv :: Derivation
169169 drv = fromGenericPackageDescription haskellResolver nixpkgsResolver targetPlatform (compilerInfo config) flagAssignment [] descr
170170 & src .~ DerivationSource "url" ("mirror://hackage/" ++ display pkgId ++ ".tar.gz") "" sha256
171− & Derivation.runHaddock .~ (Stackage.runHaddock spec)
172− & doCheck .~ runTests spec
171+ & Derivation.runHaddock &&~ Stackage.runHaddock spec
172+ & doCheck &&~ runTests spec
173173 & metaSection.hydraPlatforms %~ (`Set.difference` Map.findWithDefault Set.empty (PackageName name) (dontDistributePackages config))
174174 & metaSection.maintainers .~ Map.findWithDefault Set.empty (PackageName name) globalPackageMaintainers
175175 & metaSection.hydraPlatforms %~ (if isInDefaultPackageSet then id else const Set.empty)