@@ -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
11+ , dependencies, setupDepends
1212 )
1313 where
1414
@@ -40,6 +40,7 @@ data Derivation = MkDerivation
4040 , _isLibrary :: Bool
4141 , _isExecutable :: Bool
4242 , _extraFunctionArgs :: Set Identifier
43+ , _setupDepends :: BuildInfo
4344 , _libraryDepends :: BuildInfo
4445 , _executableDepends :: BuildInfo
4546 , _testDepends :: BuildInfo
@@ -67,6 +68,7 @@ nullDerivation = MkDerivation
6768 , _isLibrary = error "undefined Derivation.isLibrary"
6869 , _isExecutable = error "undefined Derivation.isExecutable"
6970 , _extraFunctionArgs = error "undefined Derivation.extraFunctionArgs"
71+ , _setupDepends = error "undefined Derivation.setupDepends"
7072 , _libraryDepends = error "undefined Derivation.libraryDepends"
7173 , _executableDepends = error "undefined Derivation.executableDepends"
7274 , _testDepends = error "undefined Derivation.testDepends"
@@ -87,7 +89,7 @@ nullDerivation = MkDerivation
8789
8890makeLenses ''Derivation
8991
90−makeLensesFor [("_libraryDepends", "dependencies"), ("_executableDepends", "dependencies"), ("_testDepends", "dependencies")] ''Derivation
92+makeLensesFor [("_setupDepends", "dependencies"), ("_libraryDepends", "dependencies"), ("_executableDepends", "dependencies"), ("_testDepends", "dependencies")] ''Derivation
9193
9294instance Package Derivation where
9395 packageId = view pkgid
@@ -106,6 +108,7 @@ instance Pretty Derivation where
106108 , listattr "configureFlags" empty (map (show . show) renderedFlags)
107109 , boolattr "isLibrary" (not _isLibrary || _isExecutable) _isLibrary
108110 , boolattr "isExecutable" (not _isLibrary || _isExecutable) _isExecutable
111+ , onlyIf (_setupDepends /= mempty) $ pPrintBuildInfo "setup" _setupDepends
109112 , onlyIf (_libraryDepends /= mempty) $ pPrintBuildInfo "library" _libraryDepends
110113 , onlyIf (_executableDepends /= mempty) $ pPrintBuildInfo "executable" _executableDepends
111114 , onlyIf (_testDepends /= mempty) $ pPrintBuildInfo "test" _testDepends