2022-01-11 14:07:19 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gdk-pixbuf
|
|
|
|
, gtk-engine-murrine
|
2022-01-11 14:27:04 +01:00
|
|
|
, jdupes
|
2022-01-11 14:07:19 +01:00
|
|
|
, librsvg
|
|
|
|
, libxml2
|
2022-01-11 15:44:37 +01:00
|
|
|
, buttonVariants ? [] # default to all
|
|
|
|
, colorVariants ? [] # default to all
|
|
|
|
, opacityVariants ? [] # default to all
|
|
|
|
, sizeVariants ? [] # default to all
|
2022-01-11 14:07:19 +01:00
|
|
|
}:
|
2018-09-17 10:09:34 +02:00
|
|
|
|
2022-01-11 15:44:37 +01:00
|
|
|
let
|
2019-05-07 04:22:44 +02:00
|
|
|
pname = "sierra-gtk-theme";
|
2022-01-11 15:44:37 +01: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;
|
2022-01-11 14:05:43 +01:00
|
|
|
version = "unstable-2021-05-24";
|
2018-09-17 10:09:34 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
2019-05-07 04:22:44 +02:00
|
|
|
repo = pname;
|
2022-01-11 14:05:43 +01:00
|
|
|
rev = "05899001c4fc2fec87c4d222cb3997c414e0affd";
|
|
|
|
sha256 = "174l5mryc34ma1r42pk6572c6i9hmzr9vj1a6w06nqz5qcfm1hds";
|
2018-09-17 10:09:34 +02:00
|
|
|
};
|
|
|
|
|
2022-01-11 14:07:19 +01:00
|
|
|
nativeBuildInputs = [
|
2022-01-11 14:27:04 +01:00
|
|
|
jdupes
|
2022-01-11 14:07:19 +01:00
|
|
|
libxml2
|
|
|
|
];
|
2018-09-17 10:09:34 +02:00
|
|
|
|
2022-01-11 14:07:19 +01:00
|
|
|
buildInputs = [
|
|
|
|
gdk-pixbuf
|
|
|
|
librsvg
|
|
|
|
];
|
2018-09-17 10:09:34 +02:00
|
|
|
|
2022-01-11 14:07:19 +01:00
|
|
|
propagatedUserEnvPkgs = [
|
|
|
|
gtk-engine-murrine
|
|
|
|
];
|
2018-09-17 10:09:34 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-01-11 14:07:46 +01:00
|
|
|
runHook preInstall
|
2022-01-11 14:27:04 +01:00
|
|
|
|
2022-01-16 19:13:18 +01:00
|
|
|
patchShebangs install.sh
|
2022-01-11 14:27:04 +01:00
|
|
|
|
2018-09-17 10:09:34 +02:00
|
|
|
mkdir -p $out/share/themes
|
2022-01-11 15:44:37 +01: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}
|
2022-01-11 14:27:04 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2022-01-11 14:07:46 +01:00
|
|
|
runHook postInstall
|
2018-09-17 10:09:34 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-09-17 10:09:34 +02:00
|
|
|
description = "A Mac OSX like theme for GTK based desktop environments";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/vinceliuice/Sierra-gtk-theme";
|
2018-09-17 10:09:34 +02:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|