nixpkgs/pkgs/data/themes/vimix/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
2.1 KiB
Nix
Raw Normal View History

{ lib
, stdenvNoCC
, fetchFromGitHub
, gnome-shell
, gtk-engine-murrine
, gtk_engines
, jdupes
, sassc
, gitUpdater
, themeVariants ? [] # default: doder (blue)
, colorVariants ? [] # default: all
, sizeVariants ? [] # default: standard
, tweaks ? []
}:
2020-02-24 15:51:12 +00:00
let
2020-02-24 15:51:12 +00:00
pname = "vimix-gtk-themes";
in
lib.checkListOfEnum "${pname}: theme variants" [ "doder" "beryl" "ruby" "amethyst" "jade" "grey" "all" ] themeVariants
lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants
lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" "all" ] sizeVariants
lib.checkListOfEnum "${pname}: tweaks" [ "flat" "grey" "mix" "translucent" ] tweaks
stdenvNoCC.mkDerivation rec {
inherit pname;
version = "2023-06-21";
2020-02-24 15:51:12 +00:00
src = fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = version;
sha256 = "/LZj7iVWJI4U66XC15TuLnqXVEIF/lOlV+Jujf54NV0=";
2020-02-24 15:51:12 +00:00
};
nativeBuildInputs = [
gnome-shell # needed to determine the gnome-shell version
jdupes
sassc
];
2020-02-24 15:51:12 +00:00
buildInputs = [
gtk_engines
];
propagatedUserEnvPkgs = [
gtk-engine-murrine
];
2020-02-24 15:51:12 +00:00
postPatch = ''
patchShebangs install.sh
'';
2020-02-24 15:51:12 +00:00
installPhase = ''
runHook preInstall
2020-02-24 15:51:12 +00:00
mkdir -p $out/share/themes
name= HOME="$TMPDIR" ./install.sh \
${lib.optionalString (themeVariants != []) "--theme " + builtins.toString themeVariants} \
${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \
${lib.optionalString (sizeVariants != []) "--size " + builtins.toString sizeVariants} \
${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \
--dest $out/share/themes
2020-02-24 15:51:12 +00:00
rm $out/share/themes/*/{AUTHORS,LICENSE}
jdupes --quiet --link-soft --recurse $out/share
runHook postInstall
2020-02-24 15:51:12 +00:00
'';
passthru.updateScript = gitUpdater { };
meta = with lib; {
2020-02-24 15:51:12 +00:00
description = "Flat Material Design theme for GTK based desktop environments";
homepage = "https://github.com/vinceliuice/vimix-gtk-themes";
license = licenses.gpl3Only;
2020-02-24 15:51:12 +00:00
platforms = platforms.unix;
maintainers = [ maintainers.romildo ];
};
}