mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-27 12:36:51 +03:00
44 lines
901 B
Nix
44 lines
901 B
Nix
{ cargo-nextest
|
|
, cargoNextest
|
|
, lib
|
|
, linkFarmFromDrvs
|
|
, runCommand
|
|
}:
|
|
|
|
let
|
|
# cargo-nextest version in the stable-22.05 branch is too old
|
|
nextestSupportsArchives = lib.versionAtLeast
|
|
cargo-nextest.version
|
|
"0.9.15";
|
|
|
|
nextestSimple = cargoNextest {
|
|
src = ./simple;
|
|
pname = "nextest-simple";
|
|
cargoArtifacts = null;
|
|
};
|
|
|
|
nextestPartitionsCount = cargoNextest {
|
|
src = ./simple;
|
|
pname = "nextest-partitions-count";
|
|
partitions = 4;
|
|
partitionType = "count";
|
|
cargoArtifacts = null;
|
|
};
|
|
|
|
nextestPartitionsHash = cargoNextest {
|
|
src = ./simple;
|
|
pname = "nextest-partitions-hash";
|
|
partitions = 4;
|
|
partitionType = "hash";
|
|
cargoArtifacts = null;
|
|
};
|
|
in
|
|
runCommand "nextestTests" {
|
|
buildInputs = [ nextestSimple ] ++ (lib.optionals nextestSupportsArchives [
|
|
nextestPartitionsCount
|
|
nextestPartitionsHash
|
|
]);
|
|
} ''
|
|
mkdir -p $out
|
|
''
|