12 , altVariants ? [] # default: normal
13 , colorVariants ? [] # default: all
14 , opacityVariants ? [] # default: all
15 , themeVariants ? [] # default: default (BigSur-like theme)
16 , iconVariant ? null # default: standard (Apple logo)
17 , nautilusStyle ? null # default: stable (BigSur-like style)
18 , nautilusSize ? null # default: 200px
19 , panelOpacity ? null # default: 15%
20 , panelSize ? null # default: 32px
21 , roundedMaxWindow ? false # default: false
22 , nordColor ? false # default = false
23 , darkerColor ? false # default = false
27 pname = "whitesur-gtk-theme";
28 single = x: lib.optional (x != null) x;
31 lib.checkListOfEnum "${pname}: alt variants" [ "normal" "alt" "all" ] altVariants
32 lib.checkListOfEnum "${pname}: color variants" [ "Light" "Dark" ] colorVariants
33 lib.checkListOfEnum "${pname}: opacity variants" [ "normal" "solid" ] opacityVariants
34 lib.checkListOfEnum "${pname}: theme variants" [ "default" "blue" "purple" "pink" "red" "orange" "yellow" "green" "grey" "all" ] themeVariants
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" ] (single nautilusStyle)
37 lib.checkListOfEnum "${pname}: nautilus sidebar minimum width" [ "default" "180" "220" "240" "260" "280" ] (single nautilusSize)
38 lib.checkListOfEnum "${pname}: panel opacity" [ "default" "30" "45" "60" "75" ] (single panelOpacity)
39 lib.checkListOfEnum "${pname}: panel size" [ "default" "smaller" "bigger" ] (single panelSize)
41 stdenv.mkDerivation rec {
42 pname = "whitesur-gtk-theme";
43 version = "2024.09.02";
45 src = fetchFromGitHub {
46 owner = "vinceliuice";
49 hash = "sha256-a32iHPcbMYuBy65FWm/fkjwJQE3aVScR3WJJzKTVx9k=";
62 gnome-themes-extra # adwaita engine for Gtk2
66 find -name "*.sh" -print0 | while IFS= read -r -d ''' file; do
70 # Do not provide `sudo`, as it is not needed in our use case of the install script
71 substituteInPlace shell/lib-core.sh --replace-fail '$(which sudo)' false
73 # Provides a dummy home directory
74 substituteInPlace shell/lib-core.sh --replace-fail 'MY_HOME=$(getent passwd "''${MY_USERNAME}" | cut -d: -f6)' 'MY_HOME=/tmp'
82 mkdir -p $out/share/themes
85 ${toString (map (x: "--alt " + x) altVariants)} \
86 ${toString (map (x: "--color " + x) colorVariants)} \
87 ${toString (map (x: "--opacity " + x) opacityVariants)} \
88 ${toString (map (x: "--theme " + x) themeVariants)} \
89 ${lib.optionalString (nautilusStyle != null) ("--nautilus " + nautilusStyle)} \
90 ${lib.optionalString (nautilusSize != null) ("--size " + nautilusSize)} \
91 ${lib.optionalString roundedMaxWindow "--roundedmaxwindow"} \
92 ${lib.optionalString nordColor "--nordcolor"} \
93 ${lib.optionalString darkerColor "--darkercolor"} \
94 ${lib.optionalString (iconVariant != null) ("--gnome-shell -i " + iconVariant)} \
95 ${lib.optionalString (panelSize != null) ("--gnome-shell -height " + panelSize)} \
96 ${lib.optionalString (panelOpacity != null) ("--gnome-shell -panelopacity " + panelOpacity)} \
97 --dest $out/share/themes
99 jdupes --quiet --link-soft --recurse $out/share
104 passthru.updateScript = gitUpdater { };
107 description = "MacOS BigSur like Gtk+ theme based on Elegant Design";
108 homepage = "https://github.com/vinceliuice/WhiteSur-gtk-theme";
109 license = lib.licenses.mit;
110 platforms = lib.platforms.unix;
111 maintainers = with lib.maintainers; [ romildo ];