2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, glib
|
2021-08-05 21:33:18 +00:00
|
|
|
, gnome-shell
|
2021-06-28 23:13:55 +00:00
|
|
|
, gnome-themes-extra
|
|
|
|
, libxml2
|
|
|
|
, sassc
|
|
|
|
, util-linux
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "whitesur-gtk-theme";
|
2021-10-17 02:12:59 +00:00
|
|
|
version = "2021-09-24";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-10-17 02:12:59 +00:00
|
|
|
sha256 = "12dwmgq0kadjfky5bjm62vwgdlw3nmrrhqqs5iw15w0pn3mbmd5c";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
glib
|
2021-08-05 21:33:18 +00:00
|
|
|
gnome-shell
|
2021-06-28 23:13:55 +00:00
|
|
|
libxml2
|
|
|
|
sassc
|
|
|
|
util-linux
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gnome-themes-extra # adwaita engine for Gtk2
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
find -name "*.sh" -print0 | while IFS= read -r -d ''' file; do patchShebangs "$file"; done
|
|
|
|
|
|
|
|
# Do not provide `sudo`, as it is not needed in our use case of the install script
|
|
|
|
substituteInPlace lib-core.sh --replace '$(which sudo)' false
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
# Provides a dummy home directory
|
|
|
|
substituteInPlace lib-core.sh --replace 'MY_HOME=$(getent passwd "''${MY_USERNAME}" | cut -d: -f6)' 'MY_HOME=/tmp'
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/themes
|
|
|
|
./install.sh --dest $out/share/themes --alt all --theme all
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "MacOS Big Sur like theme for Gnome desktops";
|
|
|
|
homepage = "https://github.com/vinceliuice/WhiteSur-gtk-theme";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|