1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 15:13:55 +02:00

Fix exportReferencesGraph in the structured attrs case

This commit is contained in:
Eelco Dolstra 2017-10-25 14:08:29 +02:00
parent 2d5b1b24bf
commit 3395e3bbc4
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 87 additions and 69 deletions

View file

@ -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;
}