mirror of
https://github.com/NixOS/nix.git
synced 2025-12-10 11:01:03 +01:00
Adds basic resource tracking to system features used by distributed builds, similar to resource management in job schedulers like Slurm. Includes a positive and negative functional test and a documentation update to the distributed builds section. Resolves #2307 Signed-off-by: Lisanna Dettwyler <lisanna.dettwyler@gmail.com>
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{ busybox }:
|
|
|
|
with import ./config.nix;
|
|
|
|
let
|
|
drv1 = mkDerivation {
|
|
name = "resource-management-1";
|
|
shell = busybox;
|
|
builder = ./simple.builder.sh;
|
|
PATH = "";
|
|
goodPath = path;
|
|
requiredSystemFeatures = ["test:2"];
|
|
meta.position = "${__curPos.file}:${toString __curPos.line}";
|
|
};
|
|
drv2 = mkDerivation {
|
|
name = "resource-management-2";
|
|
shell = busybox;
|
|
builder = ./simple.builder.sh;
|
|
PATH = "";
|
|
goodPath = path;
|
|
requiredSystemFeatures = ["test:2"];
|
|
meta.position = "${__curPos.file}:${toString __curPos.line}";
|
|
};
|
|
drv3 = mkDerivation {
|
|
name = "resource-management-3";
|
|
shell = busybox;
|
|
builder = ./simple.builder.sh;
|
|
PATH = "";
|
|
goodPath = path;
|
|
requiredSystemFeatures = ["test:2"];
|
|
meta.position = "${__curPos.file}:${toString __curPos.line}";
|
|
};
|
|
drv4 = mkDerivation {
|
|
name = "resource-management-4";
|
|
shell = busybox;
|
|
builder = ./simple.builder.sh;
|
|
PATH = "";
|
|
goodPath = path;
|
|
requiredSystemFeatures = ["test:2"];
|
|
meta.position = "${__curPos.file}:${toString __curPos.line}";
|
|
};
|
|
in mkDerivation {
|
|
name = "resource-management";
|
|
shell = busybox;
|
|
builder = ./simple.builder.sh;
|
|
PATH = "";
|
|
goodPath = path;
|
|
DRVS = "${drv1}${drv2}${drv3}${drv4}";
|
|
meta.position = "${__curPos.file}:${toString __curPos.line}";
|
|
}
|