12 , altVariants ? [] # default: normal
13 , colorVariants ? [] # default: all
14 , opacityVariants ? [] # default: all
15 , themeVariants ? [] # default: default (BigSur-like theme)
16 , schemeVariants ? [] # default: standard
17 , iconVariant ? null # default: standard (Apple logo)
18 , nautilusStyle ? null # default: stable (BigSur-like style)
19 , panelOpacity ? null # default: 15%
20 , panelSize ? null # default: 32px
21 , roundedMaxWindow ? false # default: false
22 , darkerColor ? false # default = false
26 pname = "whitesur-gtk-theme";
27 single = x: lib.optional (x != null) x;
30 lib.checkListOfEnum "${pname}: window control buttons variants" [ "normal" "alt" "all" ] altVariants
31 lib.checkListOfEnum "${pname}: color variants" [ "light" "dark" ] colorVariants
32 lib.checkListOfEnum "${pname}: opacity variants" [ "normal" "solid" ] opacityVariants
33 lib.checkListOfEnum "${pname}: accent color variants" [ "default" "blue" "purple" "pink" "red" "orange" "yellow" "green" "grey" "all" ] themeVariants
34 lib.checkListOfEnum "${pname}: colorscheme style variants" [ "standard" "nord" ] schemeVariants
35 lib.checkListOfEnum "${pname}: activities icon variants" [ "standard" "apple" "simple" "gnome" "ubuntu" "tux" "arch" "manjaro" "fedora" "debian" "void" "opensuse" "popos" "mxlinux" "zorin" "budgie" "gentoo" ] (single iconVariant)
36 lib.checkListOfEnum "${pname}: nautilus style" [ "stable" "normal" "mojave" "glassy" "right" ] (single nautilusStyle)
37 lib.checkListOfEnum "${pname}: panel opacity" [ "default" "30" "45" "60" "75" ] (single panelOpacity)
38 lib.checkListOfEnum "${pname}: panel size" [ "default" "smaller" "bigger" ] (single panelSize)
40 stdenv.mkDerivation rec {
41 pname = "whitesur-gtk-theme";
42 version = "2024-11-18";
44 src = fetchFromGitHub {
45 owner = "vinceliuice";
48 hash = "sha256-SSGb7EdJN8E4N8b98VO7oFTeOmhKEo/0qhso9410ihg=";
61 gnome-themes-extra # adwaita engine for Gtk2
65 find -name "*.sh" -print0 | while IFS= read -r -d ''' file; do
69 # Do not provide `sudo`, as it is not needed in our use case of the install script
70 substituteInPlace libs/lib-core.sh --replace-fail '$(which sudo)' false
72 # Provides a dummy home directory
73 substituteInPlace libs/lib-core.sh --replace-fail 'MY_HOME=$(getent passwd "''${MY_USERNAME}" | cut -d: -f6)' 'MY_HOME=/tmp'
81 mkdir -p $out/share/themes
84 ${toString (map (x: "--alt " + x) altVariants)} \
85 ${toString (map (x: "--color " + x) colorVariants)} \
86 ${toString (map (x: "--opacity " + x) opacityVariants)} \
87 ${toString (map (x: "--theme " + x) themeVariants)} \
88 ${toString (map (x: "--scheme " + x) schemeVariants)} \
89 ${lib.optionalString (nautilusStyle != null) ("--nautilus " + nautilusStyle)} \
90 ${lib.optionalString roundedMaxWindow "--roundedmaxwindow"} \
91 ${lib.optionalString darkerColor "--darkercolor"} \
92 ${lib.optionalString (iconVariant != null) ("--gnome-shell -i " + iconVariant)} \
93 ${lib.optionalString (panelSize != null) ("--gnome-shell -panelheight " + panelSize)} \
94 ${lib.optionalString (panelOpacity != null) ("--gnome-shell -panelopacity " + panelOpacity)} \
95 --dest $out/share/themes
97 jdupes --quiet --link-soft --recurse $out/share
102 passthru.updateScript = gitUpdater { };
105 description = "MacOS BigSur like Gtk+ theme based on Elegant Design";
106 homepage = "https://github.com/vinceliuice/WhiteSur-gtk-theme";
107 license = lib.licenses.mit;
108 platforms = lib.platforms.unix;
109 maintainers = with lib.maintainers; [ romildo ];