mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
2897286487
sure that it works as expected when you pass it a derivation. That is, we have to make sure that all build-time dependencies are built, and that they are all in the input closure (otherwise remote builds might fail, for example). This is ensured at instantiation time by adding all derivations and their sources to inputDrvs and inputSrcs.
29 lines
760 B
Nix
29 lines
760 B
Nix
with import ./config.nix;
|
|
|
|
rec {
|
|
|
|
printRefs =
|
|
''
|
|
echo $exportReferencesGraph
|
|
while read path; do
|
|
read drv
|
|
read nrRefs
|
|
echo "$path has $nrRefs references"
|
|
echo "$path" >> $out
|
|
for ((n = 0; n < $nrRefs; n++)); do read ref; echo "ref $ref"; test -e "$ref"; done
|
|
done < refs
|
|
'';
|
|
|
|
runtimeGraph = mkDerivation {
|
|
name = "dependencies";
|
|
builder = builtins.toFile "build-graph-builder" "${printRefs}";
|
|
exportReferencesGraph = ["refs" (import ./dependencies.nix)];
|
|
};
|
|
|
|
buildGraph = mkDerivation {
|
|
name = "dependencies";
|
|
builder = builtins.toFile "build-graph-builder" "${printRefs}";
|
|
exportReferencesGraph = ["refs" (import ./dependencies.nix).drvPath];
|
|
};
|
|
|
|
}
|