Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/cabal2nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 285dbcad4e39
Choose a base ref
...
head repository: NixOS/cabal2nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 094ff869ea47
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 5, 2019

  1. hackage2nix: fix hlint warnings

    peti committed Mar 5, 2019
    Copy the full SHA
    094ff86 View commit details
Showing with 3 additions and 3 deletions.
  1. +3 −3 hackage2nix/Main.hs
6 changes: 3 additions & 3 deletions hackage2nix/Main.hs
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ main = do
. Map.delete "som" -- TODO: https://github.com/NixOS/cabal2nix/issues/164
. Map.delete "type" -- TODO: https://github.com/NixOS/cabal2nix/issues/163
. Map.delete "control-invariants" -- TODO: depends on "assert"
. over (at ("hermes")) ((fmap (set (contains "1.3.4.3") False))) -- TODO: https://github.com/haskell/hackage-server/issues/436
. over (at "hermes") (fmap (set (contains "1.3.4.3") False)) -- TODO: https://github.com/haskell/hackage-server/issues/436
hackage <- fixup <$> readHackage hackageRepository
let
hackagePackagesFile :: FilePath
@@ -133,7 +133,7 @@ main = do
meta <- readPackageMeta hackageRepository pkgId

let isInDefaultPackageSet :: Bool
isInDefaultPackageSet = maybe False (== v) (Map.lookup name generatedDefaultPackageSet)
isInDefaultPackageSet = (== Just v) (Map.lookup name generatedDefaultPackageSet)

tarballSHA256 :: SHA256Hash
tarballSHA256 = fromMaybe (error (display pkgId ++ ": meta data has no hash for the tarball"))
@@ -155,7 +155,7 @@ main = do
& metaSection.homepage .~ ""

overrides :: Doc
overrides = fcat $ punctuate space [ disp b <> semi | b <- Set.toList ((view (dependencies . each) drv) `Set.union` view extraFunctionArgs drv), not (isFromHackage b) ]
overrides = fcat $ punctuate space [ disp b <> semi | b <- Set.toList (view (dependencies . each) drv `Set.union` view extraFunctionArgs drv), not (isFromHackage b) ]
return $ render $ nest 2 $
hang (doubleQuotes (text attr) <+> equals <+> text "callPackage") 2 (parens (pPrint drv)) <+> (braces overrides <> semi)