@@ -6,7 +6,7 @@
6module Distribution.Nixpkgs.Haskell.Derivation
6module Distribution.Nixpkgs.Haskell.Derivation
7 ( Derivation, nullDerivation, pkgid, revision, src, subpath, isLibrary, isExecutable
7 ( Derivation, nullDerivation, pkgid, revision, src, subpath, isLibrary, isExecutable
8 , extraFunctionArgs, libraryDepends, executableDepends, testDepends, configureFlags
8 , extraFunctionArgs, libraryDepends, executableDepends, testDepends, configureFlags
9− , cabalFlags, runHaddock, runHpack, 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, benchmarkDepends, enableSeparateDataOutput
11 , dependencies, setupDepends, benchmarkDepends, enableSeparateDataOutput
@@ -59,7 +59,6 @@ data Derivation = MkDerivation
59 , _editedCabalFile :: String
59 , _editedCabalFile :: String
60 , _enableSeparateDataOutput :: Bool
60 , _enableSeparateDataOutput :: Bool
61 , _metaSection :: Meta
61 , _metaSection :: Meta
64 deriving (Show, Eq, Generic)
63 deriving (Show, Eq, Generic)
@@ -91,7 +90,6 @@ nullDerivation = MkDerivation
91 , _editedCabalFile = error "undefined Derivation.editedCabalFile"
90 , _editedCabalFile = error "undefined Derivation.editedCabalFile"
92 , _enableSeparateDataOutput = error "undefined Derivation.enableSeparateDataOutput"
91 , _enableSeparateDataOutput = error "undefined Derivation.enableSeparateDataOutput"
93 , _metaSection = error "undefined Derivation.metaSection"
92 , _metaSection = error "undefined Derivation.metaSection"
94− , _runHpack = error "undefined Derivation.runHpack"
97makeLenses ''Derivation
95makeLenses ''Derivation
@@ -132,7 +130,6 @@ instance Pretty Derivation where
132 , boolattr "hyperlinkSource" (not _hyperlinkSource) _hyperlinkSource
130 , boolattr "hyperlinkSource" (not _hyperlinkSource) _hyperlinkSource
133 , onlyIf (not (null _phaseOverrides)) $ vcat ((map text . lines) _phaseOverrides)
131 , onlyIf (not (null _phaseOverrides)) $ vcat ((map text . lines) _phaseOverrides)
134 , pPrint _metaSection
132 , pPrint _metaSection
135− , onlyIf _runHpack $ attr "preConfigure" $ string "${hpack}/bin/hpack"
@@ -141,7 +138,6 @@ instance Pretty Derivation where
141 inputs = Set.unions [ Set.map (view (localName . ident)) _extraFunctionArgs
138 inputs = Set.unions [ Set.map (view (localName . ident)) _extraFunctionArgs
142 , setOf (dependencies . each . folded . localName . ident) drv
139 , setOf (dependencies . each . folded . localName . ident) drv
143 , Set.fromList ["fetch" ++ derivKind _src | derivKind _src /= "" && not isHackagePackage]
140 , Set.fromList ["fetch" ++ derivKind _src | derivKind _src /= "" && not isHackagePackage]
144− , if _runHpack then Set.singleton "hpack" else Set.empty
147 renderedFlags = [ text "-f" <> (if enable then empty else char '-') <> text (unFlagName f) | (f, enable) <- _cabalFlags ]
143 renderedFlags = [ text "-f" <> (if enable then empty else char '-') <> text (unFlagName f) | (f, enable) <- _cabalFlags ]