@@ -3,26 +3,28 @@ Description : Derivation types
33Maintainer : srk <[email protected] > 44|-}
55
6- module System.Nix.Derivation (
7- BasicDerivation (.. )
8- ) where
6+ module System.Nix.Derivation where
97
108
119import Data.Text (Text )
1210import Data.HashMap.Strict (HashMap )
11+ import Data.HashSet (HashSet )
1312import System.Nix.Path
1413
15- data BasicDerivation = BasicDerivation
16- { -- | Derivation outputs
17- outputs :: ! (HashMap Text Path )
18- , -- | Inputs that are sources
19- inputSrcs :: ! PathSet
20- , -- | Platform
21- platform :: ! Text
22- , -- | Path to builder
23- builder :: ! Path
24- , -- | Arguments
25- args :: ! [Text ]
26- , -- | Environment
27- env :: ! [HashMap Text Text ]
14+ type OutputName = Text
15+
16+ newtype DerivationInputs = DerivationInputs
17+ { _unDerivationInputs :: HashMap Path (HashSet OutputName )
18+ } deriving (Eq , Ord , Show )
19+
20+ data Derivation = Derivation
21+ { _derivationInputs :: DerivationInputs
22+ , _derivationOutputs :: ! (HashMap OutputName Path )
23+ -- | Inputs that are sources
24+ , _derivationInputSrcs :: ! PathSet
25+ , _derivationPlatform :: ! Text
26+ -- | Path to builder
27+ , _derivationBuilder :: ! Path
28+ , _derivationArgs :: ! [Text ]
29+ , _derivationEnv :: ! [HashMap Text Text ]
2830 } deriving (Eq , Ord , Show )
0 commit comments