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