diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-10-25 14:08:29 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-10-25 14:08:29 +0200 |
commit | 3395e3bbc4bc88a102600155ea996777669364ab (patch) | |
tree | 64b92889ad90ad406b828d70ffb1801b71bd9658 /tests | |
parent | 2d5b1b24bf70a498e4c0b378704cfdb6471cc699 (diff) |
Fix exportReferencesGraph in the structured attrs case
Diffstat (limited to 'tests')
-rw-r--r-- | tests/structured-attrs.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/structured-attrs.nix b/tests/structured-attrs.nix index 2adc6b6c3..72e9c6747 100644 --- a/tests/structured-attrs.nix +++ b/tests/structured-attrs.nix @@ -1,5 +1,16 @@ with import ./config.nix; +let + + dep = mkDerivation { + name = "dep"; + buildCommand = '' + mkdir $out; echo bla > $out/bla + ''; + }; + +in + mkDerivation { name = "structured"; @@ -21,6 +32,12 @@ mkDerivation { mkdir ''${outputs[out]} echo bar > $dest + + json=$(cat .attrs.json) + [[ $json =~ '"narHash":"sha256:1r7yc43zqnzl5b0als5vnyp649gk17i37s7mj00xr8kc47rjcybk"' ]] + [[ $json =~ '"narSize":288' ]] + [[ $json =~ '"closureSize":288' ]] + [[ $json =~ '"references":[]' ]] ''; buildInputs = [ "a" "b" "c" 123 "'" "\"" null ]; @@ -44,4 +61,6 @@ mkDerivation { "foo bar" = "BAD"; "1foobar" = "BAD"; "foo$" = "BAD"; + + exportReferencesGraph.refs = dep; } |