git.iko.soy/typeable/cabal2nix
on master help sign in
Generate 'enableSeparateDataOutput' attribute for https://github.com/NixOS/nixpkgs/pull/27196.
commit2a15f85eb7b4b28cfa6ff6d9a149c1ff7ae20607 authorPeter Simons <simons@cryp.to> dateMon 17 Jul 2017, 19:07 (9 years ago) parent656c589
2 files changed+5−1
src/Distribution/Nixpkgs/Haskell/Derivation.hs+4−1 src/Distribution/Nixpkgs/Haskell/FromCabal.hs+1
src/Distribution/Nixpkgs/Haskell/Derivation.hs+4−1
@@ -8,7 +8,7 @@ module Distribution.Nixpkgs.Haskell.Derivation
88 , extraFunctionArgs, libraryDepends, executableDepends, testDepends, configureFlags
99 , cabalFlags, runHaddock, jailbreak, doCheck, testTarget, hyperlinkSource, enableSplitObjs
1010 , enableLibraryProfiling, enableExecutableProfiling, phaseOverrides, editedCabalFile, metaSection
11− , dependencies, setupDepends, benchmarkDepends
11+ , dependencies, setupDepends, benchmarkDepends, enableSeparateDataOutput
1212 )
1313 where
1414
@@ -57,6 +57,7 @@ data Derivation = MkDerivation
5757 , _enableSplitObjs :: Bool
5858 , _phaseOverrides :: String
5959 , _editedCabalFile :: String
60+ , _enableSeparateDataOutput :: Bool
6061 , _metaSection :: Meta
6162 }
6263 deriving (Show, Eq, Generic)
@@ -87,6 +88,7 @@ nullDerivation = MkDerivation
8788 , _enableSplitObjs = error "undefined Derivation.enableSplitObjs"
8889 , _phaseOverrides = error "undefined Derivation.phaseOverrides"
8990 , _editedCabalFile = error "undefined Derivation.editedCabalFile"
91+ , _enableSeparateDataOutput = error "undefined Derivation.enableSeparateDataOutput"
9092 , _metaSection = error "undefined Derivation.metaSection"
9193 }
9294
@@ -112,6 +114,7 @@ instance Pretty Derivation where
112114 , listattr "configureFlags" empty (map (show . show) renderedFlags)
113115 , boolattr "isLibrary" (not _isLibrary || _isExecutable) _isLibrary
114116 , boolattr "isExecutable" (not _isLibrary || _isExecutable) _isExecutable
117+ , boolattr "enableSeparateDataOutput" _enableSeparateDataOutput _enableSeparateDataOutput
115118 , onlyIf (_setupDepends /= mempty) $ pPrintBuildInfo "setup" _setupDepends
116119 , onlyIf (_libraryDepends /= mempty) $ pPrintBuildInfo "library" _libraryDepends
117120 , onlyIf (_executableDepends /= mempty) $ pPrintBuildInfo "executable" _executableDepends
src/Distribution/Nixpkgs/Haskell/FromCabal.hs+1
@@ -83,6 +83,7 @@ fromPackageDescription haskellResolver nixpkgsResolver missingDeps flags (Packag
8383 & enableSplitObjs .~ True
8484 & enableLibraryProfiling .~ False
8585 & enableExecutableProfiling .~ False
86+ & enableSeparateDataOutput .~ not (null dataFiles)
8687 & subpath .~ "."
8788 & phaseOverrides .~ mempty
8889 & editedCabalFile .~ (if xrev > 0