Skip to content

Commit

Permalink
Revert "Disable Haddock phase for packages with internal libraries."
Browse files Browse the repository at this point in the history
Cabal does the right thing since 2.4.0.0 (haskell/cabal#5253)

This reverts commit 7017487.
  • Loading branch information
shlevy committed Feb 12, 2019
1 parent d974819 commit 04feef6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 153 deletions.
7 changes: 1 addition & 6 deletions src/Distribution/Nixpkgs/Haskell/FromCabal.hs
Expand Up @@ -88,7 +88,7 @@ fromPackageDescription haskellResolver nixpkgsResolver missingDeps flags Package
& Nix.setupDepends .~ maybe mempty convertSetupBuildInfo setupBuildInfo
& configureFlags .~ mempty
& cabalFlags .~ flags
& runHaddock .~ doHaddockPhase
& runHaddock .~ maybe True (not . null . exposedModules) library
& jailbreak .~ False
& doCheck .~ True
& doBenchmark .~ False
Expand Down Expand Up @@ -150,11 +150,6 @@ fromPackageDescription haskellResolver nixpkgsResolver missingDeps flags Package
internalLibNames :: [PackageName]
internalLibNames = fmap unqualComponentNameToPackageName . catMaybes $ libName <$> subLibraries

doHaddockPhase :: Bool
doHaddockPhase | not (null internalLibNames) = False
| Just l <- library = not (null (exposedModules l))
| otherwise = True

convertBuildInfo :: Cabal.BuildInfo -> Nix.BuildInfo
convertBuildInfo Cabal.BuildInfo {..} | not buildable = mempty
convertBuildInfo Cabal.BuildInfo {..} = mempty
Expand Down
130 changes: 0 additions & 130 deletions test/golden-test-cases/haddock-library.cabal

This file was deleted.

17 changes: 0 additions & 17 deletions test/golden-test-cases/haddock-library.nix.golden

This file was deleted.

0 comments on commit 04feef6

Please sign in to comment.