Use lib.cartesianProducOfSets where lib.crossLists was used
This commit is contained in:
parent
123045a570
commit
001ba3934e
|
@ -444,8 +444,8 @@ in
|
|||
in
|
||||
# We will generate every possible pair of WM and DM.
|
||||
concatLists (
|
||||
crossLists
|
||||
(dm: wm: let
|
||||
builtins.map
|
||||
({dm, wm}: let
|
||||
sessionName = "${dm.name}${optionalString (wm.name != "none") ("+" + wm.name)}";
|
||||
script = xsession dm wm;
|
||||
desktopNames = if dm ? desktopNames
|
||||
|
@ -472,7 +472,7 @@ in
|
|||
providedSessions = [ sessionName ];
|
||||
})
|
||||
)
|
||||
[dms wms]
|
||||
(cartesianProductOfSets { dm = dms; wm = wms; })
|
||||
);
|
||||
|
||||
# Make xsessions and wayland sessions available in XDG_DATA_DIRS
|
||||
|
|
|
@ -5,7 +5,11 @@
|
|||
|
||||
let
|
||||
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
||||
in pkgs.lib.listToAttrs (pkgs.lib.crossLists (predictable: withNetworkd: {
|
||||
testCombinations = pkgs.lib.cartesianProductOfSets {
|
||||
predictable = [true false];
|
||||
withNetworkd = [true false];
|
||||
};
|
||||
in pkgs.lib.listToAttrs (builtins.map ({ predictable, withNetworkd }: {
|
||||
name = pkgs.lib.optionalString (!predictable) "un" + "predictable"
|
||||
+ pkgs.lib.optionalString withNetworkd "Networkd";
|
||||
value = makeTest {
|
||||
|
@ -30,4 +34,4 @@ in pkgs.lib.listToAttrs (pkgs.lib.crossLists (predictable: withNetworkd: {
|
|||
machine.${if predictable then "fail" else "succeed"}("ip link show eth0")
|
||||
'';
|
||||
};
|
||||
}) [[true false] [true false]])
|
||||
}) testCombinations)
|
||||
|
|
|
@ -50,10 +50,11 @@ in stdenv.mkDerivation {
|
|||
homepage = "https://github.com/solo5/solo5";
|
||||
license = licenses.isc;
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
platforms = lib.crossLists (arch: os: "${arch}-${os}") [
|
||||
[ "aarch64" "x86_64" ]
|
||||
[ "freebsd" "genode" "linux" "openbsd" ]
|
||||
];
|
||||
platforms = builtins.map ({arch, os}: "${arch}-${os}")
|
||||
(cartesianProductOfSets {
|
||||
arch = [ "aarch64" "x86_64" ];
|
||||
os = [ "freebsd" "genode" "linux" "openbsd" ];
|
||||
});
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue