packages feed

cabal2nix 2.0.3 → 2.0.4

raw patch · 6 files changed

+13/−4 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Distribution.Nixpkgs.Haskell.Hackage: readHashedHackage' :: FilePath -> IO Hackage

Files

cabal2nix.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:           cabal2nix-version:        2.0.3+version:        2.0.4 synopsis:       Convert Cabal files into Nix build instructions. description:    Convert Cabal files into Nix build instructions. Users of Nix can install the latest version by running:                 .
hackage2nix/Main.hs view
@@ -77,6 +77,8 @@   let fixup = Map.delete "acme-everything"      -- TODO: https://github.com/NixOS/cabal2nix/issues/164             . 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"+            . Map.delete "hermes"               -- TODO: https://github.com/haskell/hackage-server/issues/436   hackage <- fixup <$> readHackage hackageRepository   let       hackagePackagesFile :: FilePath
src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs view
@@ -90,6 +90,7 @@ libNixName "javascriptcoregtk-3.0"              = return "javascriptcoregtk" libNixName "javascriptcoregtk-4.0"              = return "javascriptcoregtk" libNixName "jpeg"                               = return "libjpeg"+libNixName "jvm"                                = return "jdk" libNixName "lapack"                             = return "liblapack" libNixName "ldap"                               = return "openldap" libNixName "llvm-3.0"                           = return "llvm"@@ -143,6 +144,7 @@ libNixName "ruby1.8"                            = return "ruby" libNixName "sane-backends"                      = return "saneBackends" libNixName "sass"                               = return "libsass"+libNixName "sctp"                               = return "lksctp-tools" -- This is linux-specific, we should create a common attribute if we ever add sctp support for other systems libNixName "sdl2"                               = return "SDL2" libNixName "SDL2-2.0"                           = return "SDL2" libNixName "sndfile"                            = return "libsndfile"
src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs view
@@ -64,6 +64,7 @@   , ("gi-javascriptcore", giJavascriptCorePhaseOverrides)   -- https://github.com/haskell-gi/haskell-gi/issues/36   , ("gi-pango", giCairoPhaseOverrides)                     -- https://github.com/haskell-gi/haskell-gi/issues/36   , ("gi-webkit2", giWebkit2PhaseOverrides)                 -- https://github.com/haskell-gi/haskell-gi/issues/36+  , ("gi-webkit2webextension", giWebkit2PhaseOverrides)     -- https://github.com/haskell-gi/haskell-gi/issues/36   , ("gio", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)   , ("git", set doCheck False)          -- https://github.com/vincenthz/hit/issues/33   , ("git-annex", gitAnnexHook)@@ -101,6 +102,7 @@   , ("pandoc", set jailbreak False) -- jailbreak-cabal break the build   , ("pandoc >= 1.16.0.2", set doCheck False) -- https://github.com/jgm/pandoc/issues/2709 and https://github.com/fpco/stackage/issues/1332   , ("pandoc-citeproc", set doCheck False) -- https://github.com/jgm/pandoc-citeproc/issues/172+  , ("purescript", set doCheck False) -- test suite doesn't cope with Nix build env   , ("opencv", set phaseOverrides "hardeningDisable = [ \"bindnow\" ];")   , ("qtah-cpp-qt5", set (libraryDepends . system . contains (bind "pkgs.qt5.qtbase")) True)   , ("qtah-qt5", set (libraryDepends . tool . contains (bind "pkgs.qt5.qtbase")) True)
src/Distribution/Nixpkgs/Haskell/Hackage.hs view
@@ -1,4 +1,4 @@-module Distribution.Nixpkgs.Haskell.Hackage ( readHashedHackage, module Distribution.Hackage.DB ) where+module Distribution.Nixpkgs.Haskell.Hackage ( readHashedHackage, readHashedHackage', module Distribution.Hackage.DB ) where  import Data.ByteString.Lazy ( ByteString ) import Data.Digest.Pure.SHA ( sha256, showDigest )@@ -13,7 +13,10 @@ -- original tarball.  readHashedHackage :: IO Hackage-readHashedHackage = fmap parseUnparsedHackage Unparsed.readHackage+readHashedHackage = hackagePath >>= readHashedHackage'++readHashedHackage' :: FilePath -> IO Hackage+readHashedHackage' = fmap parseUnparsedHackage . Unparsed.readHackage'   where     parseUnparsedHackage :: Unparsed.Hackage -> Hackage     parseUnparsedHackage = mapWithKey (mapWithKey . parsePackage)
src/Distribution/Nixpkgs/Haskell/PackageSourceSpec.hs view
@@ -48,7 +48,7 @@  fromDB :: Maybe String -> String -> IO Cabal.GenericPackageDescription fromDB optHackageDB pkg = do-  pkgDesc <- (lookupVersion <=< DB.lookup name) <$> maybe DB.readHashedHackage DB.readHackage' optHackageDB+  pkgDesc <- (lookupVersion <=< DB.lookup name) <$> maybe DB.readHashedHackage DB.readHashedHackage' optHackageDB   case pkgDesc of     Just r -> return r     Nothing -> hPutStrLn stderr "*** no such package in the cabal database (did you run cabal update?). " >> exitFailure