{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
module Nix.Derivation.Types
(
Derivation(..)
, DerivationOutput(..)
) where
import Control.DeepSeq (NFData)
import Data.Map (Map)
import Data.Set (Set)
import Data.Vector (Vector)
import GHC.Generics (Generic)
data Derivation fp txt = Derivation
{ outputs :: Map txt (DerivationOutput fp txt)
, inputDrvs :: Map fp (Set txt)
, inputSrcs :: Set fp
, platform :: txt
, builder :: txt
, args :: Vector txt
, env :: Map txt txt
} deriving (Eq, Generic, Ord, Show)
instance (NFData a, NFData b) => NFData (Derivation a b)
data DerivationOutput fp txt = DerivationOutput
{ path :: fp
, hashAlgo :: txt
, hash :: txt
} deriving (Eq, Generic, Ord, Show)
instance (NFData a, NFData b) => NFData (DerivationOutput a b)