mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 00:04:14 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
86 lines
2.2 KiB
Nix
86 lines
2.2 KiB
Nix
{
|
|
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
|
|
}:
|
|
|
|
let
|
|
pname = "sierra-gtk-theme";
|
|
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";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "vinceliuice";
|
|
repo = pname;
|
|
rev = "05899001c4fc2fec87c4d222cb3997c414e0affd";
|
|
sha256 = "174l5mryc34ma1r42pk6572c6i9hmzr9vj1a6w06nqz5qcfm1hds";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
jdupes
|
|
libxml2
|
|
];
|
|
|
|
buildInputs = [
|
|
gdk-pixbuf
|
|
librsvg
|
|
];
|
|
|
|
propagatedUserEnvPkgs = [
|
|
gtk-engine-murrine
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
patchShebangs install.sh
|
|
|
|
mkdir -p $out/share/themes
|
|
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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "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 ];
|
|
};
|
|
}
|