packages feed

cabal2nix 1.44 → 1.45

raw patch · 6 files changed

+22/−19 lines, 6 filesdep ~Cabal

Dependency ranges changed: Cabal

Files

cabal2nix.cabal view
@@ -1,5 +1,5 @@ Name:                   cabal2nix-Version:                1.44+Version:                1.45 Copyright:              Peter Simons, Andres Loeh License:                BSD3 License-File:           LICENSE@@ -33,8 +33,8 @@   .   The only required argument is the path to the cabal file. For example:   .-  > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.44/cabal2nix.cabal-  > cabal2nix cabal://cabal2nix-1.44+  > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.45/cabal2nix.cabal+  > cabal2nix cabal://cabal2nix-1.45   .   If the @--sha256@ option has not been specified, cabal2nix calls   @nix-prefetch-url@ to determine the hash automatically. This causes@@ -47,7 +47,7 @@ Executable cabal2nix   main-is:              Cabal2Nix.hs   hs-source-dirs:       src-  Build-Depends:        base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.8,+  Build-Depends:        base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.10,                         filepath, directory, process, HTTP, hackage-db   Extensions:           PatternGuards, RecordWildCards, CPP   Ghc-Options:          -Wall@@ -67,7 +67,7 @@ Executable hackage4nix   main-is:              Hackage4Nix.hs   hs-source-dirs:       src-  Build-Depends:        base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.8,+  Build-Depends:        base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.10,                         mtl, containers, directory, filepath, hackage-db   Extensions:           PatternGuards, RecordWildCards, CPP   Ghc-Options:          -Wall
src/Cabal2Nix.hs view
@@ -39,12 +39,12 @@  options :: [OptDescr (Configuration -> Configuration)] options =-  [ Option ['h'] ["help"]       (NoArg (\o -> o { optPrintHelp = True }))                                  "show this help text"-  , Option []    ["sha256"]     (ReqArg (\x o -> o { optSha256 = x }) "HASH")                              "sha256 hash of source tarball"-  , Option ['m'] ["maintainer"] (ReqArg (\x o -> o { optMaintainer = x : optMaintainer o }) "MAINTAINER")  "maintainer of this package (may be specified multiple times)"-  , Option ['p'] ["platform"]   (ReqArg (\x o -> o { optPlatform = x : optPlatform o }) "PLATFORM")        "supported build platforms (may be specified multiple times)"-  , Option []    ["no-haddock"] (NoArg (\o -> o { optHaddock = False }))                                   "don't run Haddock when building this package"-  , Option []    ["no-check"]   (NoArg (\o -> o { optDoCheck = False }))                                   "don't run regression test suites of this package"+  [ Option "h" ["help"]       (NoArg (\o -> o { optPrintHelp = True }))                                  "show this help text"+  , Option ""  ["sha256"]     (ReqArg (\x o -> o { optSha256 = x }) "HASH")                              "sha256 hash of source tarball"+  , Option "m" ["maintainer"] (ReqArg (\x o -> o { optMaintainer = x : optMaintainer o }) "MAINTAINER")  "maintainer of this package (may be specified multiple times)"+  , Option "p" ["platform"]   (ReqArg (\x o -> o { optPlatform = x : optPlatform o }) "PLATFORM")        "supported build platforms (may be specified multiple times)"+  , Option ""  ["no-haddock"] (NoArg (\o -> o { optHaddock = False }))                                   "don't run Haddock when building this package"+  , Option ""  ["no-check"]   (NoArg (\o -> o { optDoCheck = False }))                                   "don't run regression test suites of this package"   ]  usage :: String
src/Cabal2Nix/Generate.hs view
@@ -21,7 +21,7 @@   , isLibrary      = isJust (Cabal.library tpkg)   , isExecutable   = not (null (Cabal.executables tpkg))   , buildDepends   = map unDep deps-  , testDepends    = map unDep (concatMap Cabal.targetBuildDepends tstDeps)+  , testDepends    = map unDep tstDeps ++ concatMap Cabal.extraLibs tests   , buildTools     = map unDep tools   , extraLibs      = libs   , pkgConfDeps    = pcs@@ -43,12 +43,14 @@     descr   = Cabal.packageDescription cabal     pkg     = Cabal.package descr     deps    = Cabal.buildDepends tpkg+    tests   = map Cabal.testBuildInfo (Cabal.testSuites tpkg)     libDeps = map Cabal.libBuildInfo (maybeToList (Cabal.library tpkg))     exeDeps = map Cabal.buildInfo (Cabal.executables tpkg)-    tstDeps = map Cabal.testBuildInfo (Cabal.testSuites tpkg)-    tools   = concatMap Cabal.buildTools (libDeps ++ exeDeps ++ tstDeps)-    libs    = concatMap Cabal.extraLibs (libDeps ++ exeDeps ++ tstDeps)-    pcs     = map unDep (concatMap Cabal.pkgconfigDepends (libDeps ++ exeDeps ++ tstDeps))+    tstDeps = concatMap Cabal.buildTools tests ++ concatMap Cabal.pkgconfigDepends tests +++              concatMap Cabal.targetBuildDepends tests+    tools   = concatMap Cabal.buildTools (libDeps ++ exeDeps)+    libs    = concatMap Cabal.extraLibs (libDeps ++ exeDeps)+    pcs     = map unDep (concatMap Cabal.pkgconfigDepends (libDeps ++ exeDeps))     Right (tpkg, _) = finalizePackageDescription                         (configureCabalFlags pkg)                         (const True)
src/Cabal2Nix/License.hs view
@@ -10,6 +10,7 @@ fromCabalLicense (GPL (Just (Version [3] [])))     = Known "self.stdenv.lib.licenses.gpl3" fromCabalLicense (LGPL Nothing)                    = Unknown (Just "LGPL") fromCabalLicense (LGPL (Just (Version [2,1] [])))  = Known "self.stdenv.lib.licenses.lgpl21"+fromCabalLicense (LGPL (Just (Version [2] [])))    = Known "self.stdenv.lib.licenses.lgpl2" fromCabalLicense (LGPL (Just (Version [3] [])))    = Known "self.stdenv.lib.licenses.gpl3" fromCabalLicense BSD3                              = Known "self.stdenv.lib.licenses.bsd3" fromCabalLicense BSD4                              = Known "self.stdenv.lib.licenses.bsd4"
src/Distribution/NixOS/Derivation/Cabal.hs view
@@ -130,7 +130,7 @@                   , cabalFlags     = []                   , runHaddock     = noHaddock /= ["true"]                   , jailbreak      = jailBreak == ["true"]-                  , doCheck        = docheck == ["true"] || docheck == []+                  , doCheck        = docheck == ["true"] || null docheck                   , phaseOverrides = ""                   , metaSection  = Meta                                    { homepage    = ""
src/Distribution/NixOS/Derivation/License.hs view
@@ -15,6 +15,7 @@  import Distribution.NixOS.PrettyPrinting import Distribution.Text+import Data.Maybe  -- | The representation for licenses used in Nix derivations. Known -- licenses are Nix expressions -- such as @stdenv.lib.licenses.bsd3@@@ -46,6 +47,5 @@  instance Text License where   disp (Known x)   = text x-  disp (Unknown x) = string (maybe "unknown" id x)+  disp (Unknown x) = string (fromMaybe "unknown" x)   parse = error "parsing Distribution.NixOS.Derivation.License is not supported yet"-