diff options
author | Shea Levy <shea@shealevy.com> | 2024-01-11 07:21:16 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2024-01-11 07:21:16 -0500 |
commit | ba48ab4b954dd1c8af388d1c5a33bbd62373c6f5 (patch) | |
tree | f17f8492bed32f78c04d9d4e9ffd2b672af85943 /tests/functional/export-graph.nix | |
parent | e7c2b35827e9f4ddbec4248c5cf1ad793a2988ad (diff) | |
parent | 4dd5171652018e29bf9e496522df3be51d615a2c (diff) |
Merge branch '2.18-maintenance' into ifd-buildStore-2.18
Diffstat (limited to 'tests/functional/export-graph.nix')
-rw-r--r-- | tests/functional/export-graph.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/functional/export-graph.nix b/tests/functional/export-graph.nix new file mode 100644 index 000000000..64fe36bd1 --- /dev/null +++ b/tests/functional/export-graph.nix @@ -0,0 +1,29 @@ +with import ./config.nix; + +rec { + + printRefs = + '' + echo $exportReferencesGraph + while read path; do + read drv + read nrRefs + echo "$path has $nrRefs references" + echo "$path" >> $out + for ((n = 0; n < $nrRefs; n++)); do read ref; echo "ref $ref"; test -e "$ref"; done + done < refs + ''; + + foo."bar.runtimeGraph" = mkDerivation { + name = "dependencies"; + builder = builtins.toFile "build-graph-builder" "${printRefs}"; + exportReferencesGraph = ["refs" (import ./dependencies.nix {})]; + }; + + foo."bar.buildGraph" = mkDerivation { + name = "dependencies"; + builder = builtins.toFile "build-graph-builder" "${printRefs}"; + exportReferencesGraph = ["refs" (import ./dependencies.nix {}).drvPath]; + }; + +} |