diff --git a/hnix-store-core/src/System/Nix/Realisation.hs b/hnix-store-core/src/System/Nix/Realisation.hs index 2cc00b27..383fd178 100644 --- a/hnix-store-core/src/System/Nix/Realisation.hs +++ b/hnix-store-core/src/System/Nix/Realisation.hs @@ -28,11 +28,11 @@ import qualified Data.Text.Lazy.Builder import qualified System.Nix.Hash -- | Output of the derivation -data DerivationOutput outputName = DerivationOutput +data DerivationOutput a = DerivationOutput { derivationOutputHash :: DSum HashAlgo Digest -- ^ Hash modulo of the derivation - , derivationOutputName :: outputName - -- ^ Name of the output + , derivationOutputOutput :: a + -- ^ Output (either a OutputName or StorePatH) } deriving (Eq, Generic, Ord, Show) data DerivationOutputError @@ -74,7 +74,7 @@ derivationOutputBuilder derivationOutputBuilder outputName DerivationOutput{..} = System.Nix.Hash.algoDigestBuilder derivationOutputHash <> Data.Text.Lazy.Builder.singleton '!' - <> Data.Text.Lazy.Builder.fromText (outputName derivationOutputName) + <> Data.Text.Lazy.Builder.fromText (outputName derivationOutputOutput) -- | Build realisation context -- diff --git a/hnix-store-json/tests/JSONSpec.hs b/hnix-store-json/tests/JSONSpec.hs index d5e0eac3..df26ae46 100644 --- a/hnix-store-json/tests/JSONSpec.hs +++ b/hnix-store-json/tests/JSONSpec.hs @@ -38,7 +38,7 @@ sampleDerivationOutput = DerivationOutput $ System.Nix.Hash.mkNamedDigest "sha256" "1b4sb93wp679q4zx9k1ignby1yna3z7c4c2ri3wphylbc2dwsys0" - , derivationOutputName = + , derivationOutputOutput = forceRight $ System.Nix.OutputName.mkOutputName "foo" }