diff options
author | Rick van Schijndel <Mindavi@users.noreply.github.com> | 2024-04-19 08:26:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 08:26:09 +0200 |
commit | e00a40a257e9d960a94020989e00b7d7c1238294 (patch) | |
tree | 32aa468dd35693061a7104c23ea04aa4f2bc26d7 /pkgs/data/icons | |
parent | f8022afb8b7a0cb91184ba2a510251af454142db (diff) | |
parent | 7b687a59cd8ee5db7cfd8067943149dd0d9215cf (diff) |
Merge pull request #298680 from gvolpe/lib/transposeMap
lib/attrsets: add mapCartesianProduct function
Diffstat (limited to 'pkgs/data/icons')
-rw-r--r-- | pkgs/data/icons/catppuccin-cursors/default.nix | 3 | ||||
-rw-r--r-- | pkgs/data/icons/comixcursors/default.nix | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/pkgs/data/icons/catppuccin-cursors/default.nix b/pkgs/data/icons/catppuccin-cursors/default.nix index 20e4718515e61..eeb9dd3227f07 100644 --- a/pkgs/data/icons/catppuccin-cursors/default.nix +++ b/pkgs/data/icons/catppuccin-cursors/default.nix @@ -9,9 +9,8 @@ let palette = [ "Frappe" "Latte" "Macchiato" "Mocha" ]; color = [ "Blue" "Dark" "Flamingo" "Green" "Lavender" "Light" "Maroon" "Mauve" "Peach" "Pink" "Red" "Rosewater" "Sapphire" "Sky" "Teal" "Yellow" ]; }; - product = lib.attrsets.cartesianProductOfSets dimensions; variantName = { palette, color }: (lib.strings.toLower palette) + color; - variants = map variantName product; + variants = lib.mapCartesianProduct variantName dimensions; in stdenvNoCC.mkDerivation rec { pname = "catppuccin-cursors"; diff --git a/pkgs/data/icons/comixcursors/default.nix b/pkgs/data/icons/comixcursors/default.nix index 1c4fdc195180b..735ff686b49cf 100644 --- a/pkgs/data/icons/comixcursors/default.nix +++ b/pkgs/data/icons/comixcursors/default.nix @@ -7,14 +7,13 @@ let thickness = [ "" "Slim_" ]; # Thick or slim edges. handedness = [ "" "LH_" ]; # Right- or left-handed. }; - product = lib.cartesianProductOfSets dimensions; variantName = { color, opacity, thickness, handedness }: "${handedness}${opacity}${thickness}${color}"; variants = # (The order of this list is already good looking enough to show in the # meta.longDescription.) - map variantName product; + lib.mapCartesianProduct variantName dimensions; in stdenvNoCC.mkDerivation rec { pname = "comixcursors"; |