mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
c8d3882cdc
parallel as possible (similar to GNU Make's `-j' switch). This is useful on SMP systems, but it is especially useful for doing builds on multiple machines. The idea is that a large derivation is initiated on one master machine, which then distributes sub-derivations to any number of slave machines. This should not happen synchronously or in lock-step, so the master must be capable of dealing with multiple parallel build jobs. We now have the infrastructure to support this. TODO: substitutes are currently broken.
20 lines
342 B
Nix
20 lines
342 B
Nix
let {
|
|
|
|
mkDrv = text: inputs: derivation {
|
|
name = "parallel";
|
|
system = "@system@";
|
|
builder = "@shell@";
|
|
args = ["-e" "-x" ./parallel.builder.sh];
|
|
shared = "@extra1@";
|
|
inherit text inputs;
|
|
};
|
|
|
|
a = mkDrv "a" [];
|
|
b = mkDrv "b" [a];
|
|
c = mkDrv "c" [a];
|
|
d = mkDrv "d" [a];
|
|
e = mkDrv "e" [b c d];
|
|
|
|
body = e;
|
|
}
|