@@ -4,7 +4,7 @@
44{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
55
66module Distribution.Nixpkgs.Haskell.Derivation
7− ( Derivation, pkgid, revision, src, isLibrary, isExecutable
7+ ( Derivation, nullDerivation, pkgid, revision, src, isLibrary, isExecutable
88 , extraFunctionArgs, libraryDepends, executableDepends, testDepends, configureFlags
99 , cabalFlags, runHaddock, jailbreak, doCheck, testTarget, hyperlinkSource, enableSplitObjs
1010 , enableLibraryProfiling, enableExecutableProfiling, phaseOverrides, editedCabalFile, metaSection
@@ -25,7 +25,6 @@ import Distribution.Package
2525import Distribution.PackageDescription ( FlagAssignment, FlagName(..) )
2626import GHC.Generics ( Generic )
2727import Language.Nix
28−import Control.Lens.Create
2928import Text.PrettyPrint.HughesPJClass
3029import Control.Lens
3130import Internal.PrettyPrinting
@@ -60,31 +59,31 @@ data Derivation = MkDerivation
6059 }
6160 deriving (Show, Eq, Generic)
6261
63−instance Default Derivation where
64− def = MkDerivation
65− { _pkgid = error "undefined Derivation.pkgid"
66− , _revision = error "undefined Derivation.revision"
67− , _src = error "undefined Derivation.src"
68− , _isLibrary = error "undefined Derivation.isLibrary"
69− , _isExecutable = error "undefined Derivation.isExecutable"
70− , _extraFunctionArgs = error "undefined Derivation.extraFunctionArgs"
71− , _libraryDepends = error "undefined Derivation.libraryDepends"
72− , _executableDepends = error "undefined Derivation.executableDepends"
73− , _testDepends = error "undefined Derivation.testDepends"
74− , _configureFlags = error "undefined Derivation.configureFlags"
75− , _cabalFlags = error "undefined Derivation.cabalFlags"
76− , _runHaddock = error "undefined Derivation.runHaddock"
77− , _jailbreak = error "undefined Derivation.jailbreak"
78− , _doCheck = error "undefined Derivation.doCheck"
79− , _testTarget = error "undefined Derivation.testTarget"
80− , _hyperlinkSource = error "undefined Derivation.hyperlinkSource"
81− , _enableLibraryProfiling = error "undefined Derivation.enableLibraryProfiling"
82− , _enableExecutableProfiling = error "undefined Derivation.enableExecutableProfiling"
83− , _enableSplitObjs = error "undefined Derivation.enableSplitObjs"
84− , _phaseOverrides = error "undefined Derivation.phaseOverrides"
85− , _editedCabalFile = error "undefined Derivation.editedCabalFile"
86− , _metaSection = error "undefined Derivation.metaSection"
87− }
62+nullDerivation :: Derivation
63+nullDerivation = MkDerivation
64+ { _pkgid = error "undefined Derivation.pkgid"
65+ , _revision = error "undefined Derivation.revision"
66+ , _src = error "undefined Derivation.src"
67+ , _isLibrary = error "undefined Derivation.isLibrary"
68+ , _isExecutable = error "undefined Derivation.isExecutable"
69+ , _extraFunctionArgs = error "undefined Derivation.extraFunctionArgs"
70+ , _libraryDepends = error "undefined Derivation.libraryDepends"
71+ , _executableDepends = error "undefined Derivation.executableDepends"
72+ , _testDepends = error "undefined Derivation.testDepends"
73+ , _configureFlags = error "undefined Derivation.configureFlags"
74+ , _cabalFlags = error "undefined Derivation.cabalFlags"
75+ , _runHaddock = error "undefined Derivation.runHaddock"
76+ , _jailbreak = error "undefined Derivation.jailbreak"
77+ , _doCheck = error "undefined Derivation.doCheck"
78+ , _testTarget = error "undefined Derivation.testTarget"
79+ , _hyperlinkSource = error "undefined Derivation.hyperlinkSource"
80+ , _enableLibraryProfiling = error "undefined Derivation.enableLibraryProfiling"
81+ , _enableExecutableProfiling = error "undefined Derivation.enableExecutableProfiling"
82+ , _enableSplitObjs = error "undefined Derivation.enableSplitObjs"
83+ , _phaseOverrides = error "undefined Derivation.phaseOverrides"
84+ , _editedCabalFile = error "undefined Derivation.editedCabalFile"
85+ , _metaSection = error "undefined Derivation.metaSection"
86+ }
8887
8988makeLenses ''Derivation
9089