From 10517cf9abe8d54c66b1dd5fb18fc4b03750037f Mon Sep 17 00:00:00 2001 From: Gabriel Volpe Date: Mon, 15 Apr 2024 19:13:22 +0200 Subject: [PATCH] tree-wide: use cartesianProduct --- lib/tests/misc.nix | 12 ++++++------ nixos/tests/predictable-interface-names.nix | 2 +- .../ocaml-modules/ocaml-freestanding/default.nix | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index accceb4ddf9c..b66f335c74f5 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -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 ]; diff --git a/nixos/tests/predictable-interface-names.nix b/nixos/tests/predictable-interface-names.nix index 51d5e8ae59b9..9ac4f8211e6b 100644 --- a/nixos/tests/predictable-interface-names.nix +++ b/nixos/tests/predictable-interface-names.nix @@ -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]; diff --git a/pkgs/development/ocaml-modules/ocaml-freestanding/default.nix b/pkgs/development/ocaml-modules/ocaml-freestanding/default.nix index 85b741dbc199..e3627431d959 100644 --- a/pkgs/development/ocaml-modules/ocaml-freestanding/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-freestanding/default.nix @@ -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" ]; } ++ [