diff options
author | José Romildo <malaquias@gmail.com> | 2022-01-10 09:18:09 -0300 |
---|---|---|
committer | José Romildo <malaquias@gmail.com> | 2022-01-10 09:18:09 -0300 |
commit | d356a3a9c22ecf0989ee4ef216b75632943d770c (patch) | |
tree | bf6acb54db187e64963143e05c98b4e822a37515 /pkgs/data/themes | |
parent | df3408b9d55e0d568d2c7b548cc0b4ddeeefbd75 (diff) | |
download | nixpkgs-d356a3a9c22ecf0989ee4ef216b75632943d770c.tar nixpkgs-d356a3a9c22ecf0989ee4ef216b75632943d770c.tar.gz nixpkgs-d356a3a9c22ecf0989ee4ef216b75632943d770c.tar.bz2 nixpkgs-d356a3a9c22ecf0989ee4ef216b75632943d770c.tar.lz nixpkgs-d356a3a9c22ecf0989ee4ef216b75632943d770c.tar.xz nixpkgs-d356a3a9c22ecf0989ee4ef216b75632943d770c.tar.zst nixpkgs-d356a3a9c22ecf0989ee4ef216b75632943d770c.zip |
graphite-gtk-theme: use lib.checkListOfEnum to validate arguments
Diffstat (limited to 'pkgs/data/themes')
-rw-r--r-- | pkgs/data/themes/graphite/default.nix | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/pkgs/data/themes/graphite/default.nix b/pkgs/data/themes/graphite/default.nix index b1cc84524a8..7f3ee33c039 100644 --- a/pkgs/data/themes/graphite/default.nix +++ b/pkgs/data/themes/graphite/default.nix @@ -15,18 +15,11 @@ let pname = "graphite-gtk-theme"; - throwIfNotSubList = name: given: valid: - let - unexpected = lib.subtractLists valid given; - in - lib.throwIfNot (unexpected == []) - "${name}: ${builtins.concatStringsSep ", " (builtins.map builtins.toString unexpected)} unexpected; valid ones: ${builtins.concatStringsSep ", " (builtins.map builtins.toString valid)}"; - in -throwIfNotSubList "${pname}: theme variants" themeVariants [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "blue" "all" ] -throwIfNotSubList "${pname}: color variants" colorVariants [ "standard" "light" "dark" ] -throwIfNotSubList "${pname}: size variants" sizeVariants [ "standard" "compact" ] -throwIfNotSubList "${pname}: tweaks" tweaks [ "nord" "black" "midblack" "rimless" "normal" ] +lib.checkListOfEnum "${pname}: theme variants" [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "blue" "all" ] themeVariants +lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants +lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" ] sizeVariants +lib.checkListOfEnum "${pname}: tweaks" [ "nord" "black" "midblack" "rimless" "normal" ] tweaks stdenvNoCC.mkDerivation { inherit pname; |