@@ -0,0 +1,56 @@
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, glib
5+, gnome-themes-extra
6+, libxml2
7+, sassc
8+, util-linux
9+}:
10+
11+stdenv.mkDerivation rec {
12+ pname = "whitesur-gtk-theme";
13+ version = "2021-06-23";
14+
15+ src = fetchFromGitHub {
16+ owner = "vinceliuice";
17+ repo = pname;
18+ rev = version;
19+ sha256 = "075fw57mv6zadq4dryn8bg2b3vq8inmisq18s758cv53pprxh9hw";
20+ };
21+
22+ nativeBuildInputs = [
23+ glib
24+ libxml2
25+ sassc
26+ util-linux
27+ ];
28+
29+ buildInputs = [
30+ gnome-themes-extra # adwaita engine for Gtk2
31+ ];
32+
33+ postPatch = ''
34+ find -name "*.sh" -print0 | while IFS= read -r -d ''' file; do patchShebangs "$file"; done
35+
36+ # Do not provide `sudo`, as it is not needed in our use case of the install script
37+ substituteInPlace lib-core.sh --replace '$(which sudo)' false
38+ '';
39+
40+ dontBuild = true;
41+
42+ installPhase = ''
43+ runHook preInstall
44+ mkdir -p $out/share/themes
45+ ./install.sh --dest $out/share/themes --alt all --theme all
46+ runHook postInstall
47+ '';
48+
49+ meta = with lib; {
50+ description = "MacOS Big Sur like theme for Gnome desktops";
51+ homepage = "https://github.com/vinceliuice/WhiteSur-gtk-theme";
52+ license = licenses.mit;
53+ platforms = platforms.unix;
54+ maintainers = [ maintainers.romildo ];
55+ };
56+}