@@ -6,10 +6,22 @@
66, jdupes
77, librsvg
88, libxml2
9+, buttonVariants ? [] # default to all
10+, colorVariants ? [] # default to all
11+, opacityVariants ? [] # default to all
12+, sizeVariants ? [] # default to all
913}:
1014
11−stdenv.mkDerivation rec {
15+let
1216 pname = "sierra-gtk-theme";
17+in
18+lib.checkListOfEnum "${pname}: button variants" [ "standard" "alt" ] buttonVariants
19+lib.checkListOfEnum "${pname}: color variants" [ "light" "dark" ] colorVariants
20+lib.checkListOfEnum "${pname}: opacity variants" [ "standard" "solid" ] opacityVariants
21+lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" ] sizeVariants
22+
23+stdenv.mkDerivation {
24+ inherit pname;
1325 version = "unstable-2021-05-24";
1426
1527 src = fetchFromGitHub {
@@ -39,7 +51,11 @@ stdenv.mkDerivation rec {
3951 patchShebangs .
4052
4153 mkdir -p $out/share/themes
42− name= ./install.sh --dest $out/share/themes
54+ name= ./install.sh --dest $out/share/themes \
55+ ${lib.optionalString (buttonVariants != []) "--alt " + builtins.toString buttonVariants} \
56+ ${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \
57+ ${lib.optionalString (opacityVariants != []) "--opacity " + builtins.toString opacityVariants} \
58+ ${lib.optionalString (sizeVariants != []) "--flat " + builtins.toString sizeVariants}
4359
4460 # Replace duplicate files with hardlinks to the first file in each
4561 # set of duplicates, reducing the installed size in about 79%