mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
* Regression test for the `exportReferencesGraph'
derivation attribute.
This commit is contained in:
parent
33ecb42991
commit
2d5114452d
8 changed files with 69 additions and 33 deletions
23
tests/export-graph.nix
Normal file
23
tests/export-graph.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
with import ./config.nix;
|
||||
|
||||
rec {
|
||||
|
||||
buildGraphBuilder = builtins.toFile "build-graph-builder"
|
||||
''
|
||||
#cat refs
|
||||
while read path; do
|
||||
read drv
|
||||
read nrRefs
|
||||
echo "$path has $nrRefs references"
|
||||
echo -n "$path" >> $out
|
||||
for ((n = 0; n < $nrRefs; n++)); do read ref; echo "ref $ref"; done
|
||||
done < refs
|
||||
'';
|
||||
|
||||
buildGraph = mkDerivation {
|
||||
name = "dependencies";
|
||||
builder = buildGraphBuilder;
|
||||
exportReferencesGraph = ["refs" (import ./dependencies.nix)];
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue