2022-01-19 23:45:15 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gdk-pixbuf
|
|
|
|
, gtk-engine-murrine
|
|
|
|
, jdupes
|
|
|
|
, librsvg
|
|
|
|
, libxml2
|
|
|
|
, buttonVariants ? [] # default to all
|
|
|
|
, colorVariants ? [] # default to all
|
|
|
|
, opacityVariants ? [] # default to all
|
|
|
|
, sizeVariants ? [] # default to all
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
let
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "sierra-gtk-theme";
|
2022-01-19 23:45:15 +00:00
|
|
|
in
|
|
|
|
lib.checkListOfEnum "${pname}: button variants" [ "standard" "alt" ] buttonVariants
|
|
|
|
lib.checkListOfEnum "${pname}: color variants" [ "light" "dark" ] colorVariants
|
|
|
|
lib.checkListOfEnum "${pname}: opacity variants" [ "standard" "solid" ] opacityVariants
|
|
|
|
lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" ] sizeVariants
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname;
|
|
|
|
version = "unstable-2021-05-24";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
2022-01-19 23:45:15 +00:00
|
|
|
rev = "05899001c4fc2fec87c4d222cb3997c414e0affd";
|
|
|
|
sha256 = "174l5mryc34ma1r42pk6572c6i9hmzr9vj1a6w06nqz5qcfm1hds";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
jdupes
|
|
|
|
libxml2
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
buildInputs = [
|
|
|
|
gdk-pixbuf
|
|
|
|
librsvg
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
propagatedUserEnvPkgs = [
|
|
|
|
gtk-engine-murrine
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-01-19 23:45:15 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
patchShebangs install.sh
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/share/themes
|
2022-01-19 23:45:15 +00:00
|
|
|
name= ./install.sh --dest $out/share/themes \
|
|
|
|
${lib.optionalString (buttonVariants != []) "--alt " + builtins.toString buttonVariants} \
|
|
|
|
${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \
|
|
|
|
${lib.optionalString (opacityVariants != []) "--opacity " + builtins.toString opacityVariants} \
|
|
|
|
${lib.optionalString (sizeVariants != []) "--flat " + builtins.toString sizeVariants}
|
|
|
|
|
|
|
|
# Replace duplicate files with hardlinks to the first file in each
|
|
|
|
# set of duplicates, reducing the installed size in about 79%
|
|
|
|
jdupes -L -r $out/share
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Mac OSX like theme for GTK based desktop environments";
|
|
|
|
homepage = "https://github.com/vinceliuice/Sierra-gtk-theme";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|