mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
tree-wide: use cartesianProduct
This commit is contained in:
parent
228621e42d
commit
10517cf9ab
@ -33,7 +33,7 @@ let
|
||||
boolToString
|
||||
callPackagesWith
|
||||
callPackageWith
|
||||
cartesianProductOfSets
|
||||
cartesianProduct
|
||||
cli
|
||||
composeExtensions
|
||||
composeManyExtensions
|
||||
@ -1686,17 +1686,17 @@ runTests {
|
||||
};
|
||||
|
||||
testCartesianProductOfEmptySet = {
|
||||
expr = cartesianProductOfSets {};
|
||||
expr = cartesianProduct {};
|
||||
expected = [ {} ];
|
||||
};
|
||||
|
||||
testCartesianProductOfOneSet = {
|
||||
expr = cartesianProductOfSets { a = [ 1 2 3 ]; };
|
||||
expr = cartesianProduct { a = [ 1 2 3 ]; };
|
||||
expected = [ { a = 1; } { a = 2; } { a = 3; } ];
|
||||
};
|
||||
|
||||
testCartesianProductOfTwoSets = {
|
||||
expr = cartesianProductOfSets { a = [ 1 ]; b = [ 10 20 ]; };
|
||||
expr = cartesianProduct { a = [ 1 ]; b = [ 10 20 ]; };
|
||||
expected = [
|
||||
{ a = 1; b = 10; }
|
||||
{ a = 1; b = 20; }
|
||||
@ -1704,12 +1704,12 @@ runTests {
|
||||
};
|
||||
|
||||
testCartesianProductOfTwoSetsWithOneEmpty = {
|
||||
expr = cartesianProductOfSets { a = [ ]; b = [ 10 20 ]; };
|
||||
expr = cartesianProduct { a = [ ]; b = [ 10 20 ]; };
|
||||
expected = [ ];
|
||||
};
|
||||
|
||||
testCartesianProductOfThreeSets = {
|
||||
expr = cartesianProductOfSets {
|
||||
expr = cartesianProduct {
|
||||
a = [ 1 2 3 ];
|
||||
b = [ 10 20 30 ];
|
||||
c = [ 100 200 300 ];
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
let
|
||||
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
||||
testCombinations = pkgs.lib.cartesianProductOfSets {
|
||||
testCombinations = pkgs.lib.cartesianProduct {
|
||||
predictable = [true false];
|
||||
withNetworkd = [true false];
|
||||
systemdStage1 = [true false];
|
||||
|
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
homepage = "https://github.com/mirage/ocaml-freestanding";
|
||||
platforms = builtins.map ({ arch, os }: "${arch}-${os}")
|
||||
(cartesianProductOfSets {
|
||||
(cartesianProduct {
|
||||
arch = [ "aarch64" "x86_64" ];
|
||||
os = [ "linux" ];
|
||||
} ++ [
|
||||
|
Loading…
Reference in New Issue
Block a user