git.iko.soy/typeable/cabal2nix
on master help sign in
Use benchmark instead of bench
e36a23aJoe Hermaszewski
src/Distribution/Nixpkgs/Haskell/Derivation.hs+5−5
@@ -8,7 +8,7 @@ module Distribution.Nixpkgs.Haskell.Derivation
8 , extraFunctionArgs, libraryDepends, executableDepends, testDepends, configureFlags
8 , extraFunctionArgs, libraryDepends, executableDepends, testDepends, configureFlags
9 , cabalFlags, runHaddock, jailbreak, doCheck, testTarget, hyperlinkSource, enableSplitObjs
9 , cabalFlags, runHaddock, jailbreak, doCheck, testTarget, hyperlinkSource, enableSplitObjs
10 , enableLibraryProfiling, enableExecutableProfiling, phaseOverrides, editedCabalFile, metaSection
10 , enableLibraryProfiling, enableExecutableProfiling, phaseOverrides, editedCabalFile, metaSection
11− , dependencies, setupDepends, benchDepends
11+ , dependencies, setupDepends, benchmarkDepends
12 )
12 )
13 where
13 where
14
14
@@ -43,7 +43,7 @@ data Derivation = MkDerivation
43 , _libraryDepends :: BuildInfo
43 , _libraryDepends :: BuildInfo
44 , _executableDepends :: BuildInfo
44 , _executableDepends :: BuildInfo
45 , _testDepends :: BuildInfo
45 , _testDepends :: BuildInfo
46− , _benchDepends :: BuildInfo
46+ , _benchmarkDepends :: BuildInfo
47 , _configureFlags :: Set String
47 , _configureFlags :: Set String
48 , _cabalFlags :: FlagAssignment
48 , _cabalFlags :: FlagAssignment
49 , _runHaddock :: Bool
49 , _runHaddock :: Bool
@@ -72,7 +72,7 @@ nullDerivation = MkDerivation
72 , _libraryDepends = error "undefined Derivation.libraryDepends"
72 , _libraryDepends = error "undefined Derivation.libraryDepends"
73 , _executableDepends = error "undefined Derivation.executableDepends"
73 , _executableDepends = error "undefined Derivation.executableDepends"
74 , _testDepends = error "undefined Derivation.testDepends"
74 , _testDepends = error "undefined Derivation.testDepends"
75− , _benchDepends = error "undefined Derivation.benchDepends"
75+ , _benchmarkDepends = error "undefined Derivation.benchmarkDepends"
76 , _configureFlags = error "undefined Derivation.configureFlags"
76 , _configureFlags = error "undefined Derivation.configureFlags"
77 , _cabalFlags = error "undefined Derivation.cabalFlags"
77 , _cabalFlags = error "undefined Derivation.cabalFlags"
78 , _runHaddock = error "undefined Derivation.runHaddock"
78 , _runHaddock = error "undefined Derivation.runHaddock"
@@ -90,7 +90,7 @@ nullDerivation = MkDerivation
90
90
91makeLenses ''Derivation
91makeLenses ''Derivation
92
92
93−makeLensesFor [("_setupDepends", "dependencies"), ("_libraryDepends", "dependencies"), ("_executableDepends", "dependencies"), ("_testDepends", "dependencies"), ("_benchDepends", "dependencies")] ''Derivation
93+makeLensesFor [("_setupDepends", "dependencies"), ("_libraryDepends", "dependencies"), ("_executableDepends", "dependencies"), ("_testDepends", "dependencies"), ("_benchmarkDepends", "dependencies")] ''Derivation
94
94
95instance Package Derivation where
95instance Package Derivation where
96 packageId = view pkgid
96 packageId = view pkgid
@@ -113,7 +113,7 @@ instance Pretty Derivation where
113 , onlyIf (_libraryDepends /= mempty) $ pPrintBuildInfo "library" _libraryDepends
113 , onlyIf (_libraryDepends /= mempty) $ pPrintBuildInfo "library" _libraryDepends
114 , onlyIf (_executableDepends /= mempty) $ pPrintBuildInfo "executable" _executableDepends
114 , onlyIf (_executableDepends /= mempty) $ pPrintBuildInfo "executable" _executableDepends
115 , onlyIf (_testDepends /= mempty) $ pPrintBuildInfo "test" _testDepends
115 , onlyIf (_testDepends /= mempty) $ pPrintBuildInfo "test" _testDepends
116− , onlyIf (_benchDepends /= mempty) $ pPrintBuildInfo "bench" _benchDepends
116+ , onlyIf (_benchmarkDepends /= mempty) $ pPrintBuildInfo "benchmark" _benchmarkDepends
117 , boolattr "enableLibraryProfiling" _enableLibraryProfiling _enableLibraryProfiling
117 , boolattr "enableLibraryProfiling" _enableLibraryProfiling _enableLibraryProfiling
118 , boolattr "enableExecutableProfiling" _enableExecutableProfiling _enableExecutableProfiling
118 , boolattr "enableExecutableProfiling" _enableExecutableProfiling _enableExecutableProfiling
119 , boolattr "enableSplitObjs" (not _enableSplitObjs) _enableSplitObjs
119 , boolattr "enableSplitObjs" (not _enableSplitObjs) _enableSplitObjs
src/Distribution/Nixpkgs/Haskell/FromCabal.hs+1−1
@@ -63,7 +63,7 @@ fromPackageDescription haskellResolver nixpkgsResolver missingDeps flags (Packag
63 & libraryDepends .~ maybe mempty (convertBuildInfo . libBuildInfo) library
63 & libraryDepends .~ maybe mempty (convertBuildInfo . libBuildInfo) library
64 & executableDepends .~ mconcat (map (convertBuildInfo . buildInfo) executables)
64 & executableDepends .~ mconcat (map (convertBuildInfo . buildInfo) executables)
65 & testDepends .~ mconcat (map (convertBuildInfo . testBuildInfo) testSuites)
65 & testDepends .~ mconcat (map (convertBuildInfo . testBuildInfo) testSuites)
66− & benchDepends .~ mconcat (map (convertBuildInfo . benchmarkBuildInfo) benchmarks)
66+ & benchmarkDepends .~ mconcat (map (convertBuildInfo . benchmarkBuildInfo) benchmarks)
67 & Nix.setupDepends .~ maybe mempty convertSetupBuildInfo setupBuildInfo
67 & Nix.setupDepends .~ maybe mempty convertSetupBuildInfo setupBuildInfo
68 & configureFlags .~ mempty
68 & configureFlags .~ mempty
69 & cabalFlags .~ flags
69 & cabalFlags .~ flags
src/Distribution/Nixpkgs/Haskell/FromCabal/Normalize.hs+1−1
@@ -17,7 +17,7 @@ normalize drv = drv
17 & over libraryDepends (normalizeBuildInfo (packageName drv))
17 & over libraryDepends (normalizeBuildInfo (packageName drv))
18 & over executableDepends (normalizeBuildInfo (packageName drv))
18 & over executableDepends (normalizeBuildInfo (packageName drv))
19 & over testDepends (normalizeBuildInfo (packageName drv))
19 & over testDepends (normalizeBuildInfo (packageName drv))
20− & over benchDepends (normalizeBuildInfo (packageName drv))
20+ & over benchmarkDepends (normalizeBuildInfo (packageName drv))
21 & over metaSection normalizeMeta
21 & over metaSection normalizeMeta
22 & over cabalFlags normalizeCabalFlags
22 & over cabalFlags normalizeCabalFlags
23 & jailbreak %~ (&& (packageName drv /= PackageName "jailbreak-cabal"))
23 & jailbreak %~ (&& (packageName drv /= PackageName "jailbreak-cabal"))