2024-11-11 14:21:34 +00:00
|
|
|
with import ./config.nix;
|
2009-03-17 16:33:48 +00:00
|
|
|
|
|
|
|
rec {
|
|
|
|
|
2009-03-17 17:38:32 +00:00
|
|
|
printRefs =
|
2009-03-17 16:33:48 +00:00
|
|
|
''
|
2009-03-18 17:36:42 +00:00
|
|
|
echo $exportReferencesGraph
|
2009-03-17 16:33:48 +00:00
|
|
|
while read path; do
|
|
|
|
read drv
|
|
|
|
read nrRefs
|
|
|
|
echo "$path has $nrRefs references"
|
2009-03-17 17:38:32 +00:00
|
|
|
echo "$path" >> $out
|
2009-03-18 17:36:42 +00:00
|
|
|
for ((n = 0; n < $nrRefs; n++)); do read ref; echo "ref $ref"; test -e "$ref"; done
|
2009-03-17 16:33:48 +00:00
|
|
|
done < refs
|
|
|
|
'';
|
|
|
|
|
2013-11-18 10:21:12 +00:00
|
|
|
foo."bar.runtimeGraph" = mkDerivation {
|
2009-03-17 16:33:48 +00:00
|
|
|
name = "dependencies";
|
2009-03-17 17:38:32 +00:00
|
|
|
builder = builtins.toFile "build-graph-builder" "${printRefs}";
|
2023-08-23 12:00:00 +00:00
|
|
|
exportReferencesGraph = ["refs" (import ./dependencies.nix {})];
|
2009-03-17 16:33:48 +00:00
|
|
|
};
|
|
|
|
|
2013-11-18 10:21:12 +00:00
|
|
|
foo."bar.buildGraph" = mkDerivation {
|
2009-03-17 17:38:32 +00:00
|
|
|
name = "dependencies";
|
|
|
|
builder = builtins.toFile "build-graph-builder" "${printRefs}";
|
2023-08-23 12:00:00 +00:00
|
|
|
exportReferencesGraph = ["refs" (import ./dependencies.nix {}).drvPath];
|
2009-03-17 17:38:32 +00:00
|
|
|
};
|
|
|
|
|
2009-03-17 16:33:48 +00:00
|
|
|
}
|