2009-03-17 16:33:48 +00:00
|
|
|
with import ./config.nix;
|
|
|
|
|
|
|
|
rec {
|
|
|
|
|
2009-03-17 17:38:32 +00:00
|
|
|
printRefs =
|
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-17 16:33:48 +00:00
|
|
|
for ((n = 0; n < $nrRefs; n++)); do read ref; echo "ref $ref"; done
|
|
|
|
done < refs
|
|
|
|
'';
|
|
|
|
|
2009-03-17 17:38:32 +00:00
|
|
|
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}";
|
2009-03-17 16:33:48 +00:00
|
|
|
exportReferencesGraph = ["refs" (import ./dependencies.nix)];
|
|
|
|
};
|
|
|
|
|
2009-03-17 17:38:32 +00:00
|
|
|
buildGraph = mkDerivation {
|
|
|
|
name = "dependencies";
|
|
|
|
builder = builtins.toFile "build-graph-builder" "${printRefs}";
|
|
|
|
exportBuildReferencesGraph = ["refs" (import ./dependencies.nix).drvPath];
|
|
|
|
};
|
|
|
|
|
2009-03-17 16:33:48 +00:00
|
|
|
}
|