tree-wide: use cartesianProduct

This commit is contained in:
Gabriel Volpe 2024-04-15 19:13:22 +02:00
parent 228621e42d
commit 10517cf9ab
No known key found for this signature in database
GPG Key ID: 121D4302A64B2261
3 changed files with 8 additions and 8 deletions

View File

@ -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 ];

View File

@ -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];

View File

@ -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" ];
} ++ [