cabal2nix 1.63 → 1.64
raw patch · 7 files changed
+23/−11 lines, 7 files
Files
- cabal2nix.cabal +6/−4
- src/Cabal2Nix/Flags.hs +1/−0
- src/Cabal2Nix/Generate.hs +1/−0
- src/Cabal2Nix/PostProcess.hs +3/−5
- src/Distribution/NixOS/Derivation/Cabal.hs +4/−0
- src/cabal2nix.hs +4/−1
- src/hackage4nix.hs +4/−1
cabal2nix.cabal view
@@ -1,5 +1,5 @@ Name: cabal2nix-Version: 1.63+Version: 1.64 Copyright: Peter Simons, Andres Loeh License: BSD3 License-File: LICENSE@@ -21,8 +21,10 @@ > --sha256=HASH sha256 hash of source tarball > -m MAINTAINER --maintainer=MAINTAINER maintainer of this package (may be specified multiple times) > -p PLATFORM --platform=PLATFORM supported build platforms (may be specified multiple times)- > --no-check don't run regression test suites of this package > --jailbreak don't honor version restrictions on build inputs+ > --no-haddock don't run Haddock when building this package+ > --no-check don't run regression test suites of this package+ > --no-hyperlink-source don't add pretty-printed source code to the documentation > > Recognized URI schemes: >@@ -34,8 +36,8 @@ . The only required argument is the path to the cabal file. For example: .- > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.63/cabal2nix.cabal- > cabal2nix cabal://cabal2nix-1.63+ > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.64/cabal2nix.cabal+ > cabal2nix cabal://cabal2nix-1.64 . If the @--sha256@ option has not been specified, cabal2nix calls @nix-prefetch-url@ to determine the hash automatically. This causes
src/Cabal2Nix/Flags.hs view
@@ -15,6 +15,7 @@ | name == "idris" = [enable "llvm", enable "gmp", enable "ffi"] | name == "io-streams" = [enable "NoInteractiveTests"] | name == "reactive-banana-wx" = [disable "buildExamples"]+ | name == "snap-server" = [enable "openssl"] | name == "xmobar" = [enable "all_extensions"] | name == "xmonad-extras" = [disable "with_hlist", enable "with_split", enable "with_parsec"] | name == "yi" = [enable "pango"]
src/Cabal2Nix/Generate.hs view
@@ -32,6 +32,7 @@ , jailbreak = False , doCheck = True , testTarget = ""+ , hyperlinkSource = True , phaseOverrides = "" , metaSection = Meta { homepage = Cabal.homepage descr
src/Cabal2Nix/PostProcess.hs view
@@ -37,6 +37,7 @@ | pname == "gloss-raster" = deriv { extraLibs = "llvm":extraLibs } | pname == "GLUT" = deriv { extraLibs = "glut":"libSM":"libICE":"libXmu":"libXi":"mesa":extraLibs } | pname == "gtk" = deriv { extraLibs = "pkgconfig":"libc":extraLibs, buildDepends = delete "gio" buildDepends }+ | pname == "gtkglext" = deriv { pkgConfDeps = "pangox_compat":pkgConfDeps } | pname == "gtk2hs-buildtools"= deriv { buildDepends = "hashtables":buildDepends } | pname == "gtksourceview2" = deriv { extraLibs = "pkgconfig":"libc":extraLibs } | pname == "haddock" && version < Version [2,14] []@@ -49,6 +50,7 @@ | pname == "hfsevents" = deriv { buildTools = "gccApple":buildTools, phaseOverrides = "configureFlags = \"--ghc-option=-pgmc=${gccApple}/bin/gcc\";" } | pname == "HFuse" = deriv { phaseOverrides = hfusePreConfigure } | pname == "highlighting-kate"= highlightingKatePostProcessing deriv+ | pname == "hlibgit2" = deriv { testDepends = "git":testDepends } | pname == "HList" = deriv { buildTools = "diffutils":buildTools } | pname == "hmatrix" = deriv { extraLibs = "gsl":"liblapack":"blas":extraLibs } | pname == "hoogle" = deriv { testTarget = "--test-option=--no-net" }@@ -99,7 +101,6 @@ | pname == "transformers" && version >= Version [0,4,1] [] = deriv { runHaddock = True, phaseOverrides = transformersNoHaddock } | pname == "tz" = deriv { extraFunctionArgs = ["pkgs_tzdata"], phaseOverrides = "preConfigure = \"export TZDIR=${pkgs_tzdata}/share/zoneinfo\";" }- | pname == "unix-time" = deriv { phaseOverrides = unixTimeConfigureFlags } | pname == "vacuum" = deriv { extraLibs = "ghcPaths":extraLibs } | pname == "wxc" = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs, phaseOverrides = wxcPostInstall } | pname == "wxcore" = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs }@@ -269,6 +270,7 @@ agdaPostInstall :: String agdaPostInstall = unlines [ "postInstall = ''"+ , " $out/bin/agda -c --no-main $out/share/Agda-*/lib/prim/Agda/Primitive.agda" , " $out/bin/agda-mode compile" , "'';" ]@@ -281,10 +283,6 @@ , " install \"elisp/\"*.el \"elisp/\"*.elc $out/share/emacs/site-lisp" , "'';" ]--unixTimeConfigureFlags :: String-unixTimeConfigureFlags =- "configureFlags = self.stdenv.lib.optionalString self.enableSharedLibraries \"--ghc-option=-fPIC\";" sloanePostInstall :: String sloanePostInstall = unlines
src/Distribution/NixOS/Derivation/Cabal.hs view
@@ -58,6 +58,7 @@ , jailbreak :: Bool , doCheck :: Bool , testTarget :: String+ , hyperlinkSource :: Bool , phaseOverrides :: String , metaSection :: Meta }@@ -90,6 +91,7 @@ , boolattr "jailbreak" (jailbreak deriv) (jailbreak deriv) , boolattr "doCheck" (not (doCheck deriv)) (doCheck deriv) , onlyIf (testTarget deriv) $ attr "testTarget" $ string (testTarget deriv)+ , boolattr "hyperlinkSource" (not (hyperlinkSource deriv)) (hyperlinkSource deriv) , onlyIf (phaseOverrides deriv) $ vcat ((map text . lines) (phaseOverrides deriv)) , disp (metaSection deriv) ]@@ -119,6 +121,7 @@ , noHaddock <- buf `regsubmatch` "noHaddock *= *(true|false) *;" , jailBreak <- buf `regsubmatch` "jailbreak *= *(true|false) *;" , docheck <- buf `regsubmatch` "doCheck *= *(true|false) *;"+ , hyperlSrc <- buf `regsubmatch` "hyperlinkSource *= *(true|false) *;" = Just MkDerivation { pname = name , version = vers@@ -137,6 +140,7 @@ , jailbreak = jailBreak == ["true"] , doCheck = docheck == ["true"] || null docheck , testTarget = ""+ , hyperlinkSource = hyperlSrc == ["true"] || null hyperlSrc , phaseOverrides = "" , metaSection = Meta { homepage = ""
src/cabal2nix.hs view
@@ -24,6 +24,7 @@ , optHaddock :: Bool , optDoCheck :: Bool , optJailbreak :: Bool+ , optHyperlinkSource :: Bool } deriving (Show) @@ -37,6 +38,7 @@ , optHaddock = True , optDoCheck = True , optJailbreak = False+ , optHyperlinkSource = True } options :: [OptDescr (Configuration -> Configuration)]@@ -45,9 +47,10 @@ , Option "" ["sha256"] (ReqArg (\x o -> o { optSha256 = Just 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 "" ["jailbreak"] (NoArg (\o -> o { optJailbreak = True })) "don't honor version restrictions on build inputs" , 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 "" ["jailbreak"] (NoArg (\o -> o { optJailbreak = True })) "don't honor version restrictions on build inputs"+ , Option "" ["no-hyperlink-source"] (NoArg (\o -> o { optHyperlinkSource = False })) "don't add pretty-printed source code to the documentation" ] usage :: String
src/hackage4nix.hs view
@@ -120,6 +120,7 @@ , runHaddock = runHaddock deriv , doCheck = doCheck deriv , jailbreak = jailbreak deriv+ , hyperlinkSource = hyperlinkSource deriv } meta = metaSection deriv' plats' = if null plats then platforms meta else plats@@ -228,10 +229,12 @@ , "top-level/all-packages.nix", "top-level/haskell-packages.nix" -- This build is way too complicated to maintain it automatically. , "pkgs/development/compilers/pakcs/default.nix"+ , "pkgs/development/libraries/haskell/hoogle/local.nix" -- Requires platform-specific magic that I don't want to add to cabal2nix. , "pkgs/development/libraries/haskell/fsnotify/default.nix" -- Not registered on Hackage.- , "pkgs/development/compilers/agda/stdlib.nix"+ , "pkgs/development/compilers/agda/stdlib-0.7.nix"+ , "pkgs/development/compilers/agda/stdlib-0.8.nix" , "pkgs/development/compilers/cryptol/1.8.x.nix" , "pkgs/development/compilers/cryptol/2.0.x.nix" , "pkgs/development/compilers/jhc/default.nix"