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