2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, gitUpdater
|
2021-12-06 16:07:01 +00:00
|
|
|
, gdk-pixbuf
|
|
|
|
, gnome-themes-extra
|
|
|
|
, gtk-engine-murrine
|
2022-08-12 12:06:08 +00:00
|
|
|
, jdupes
|
2021-12-06 16:07:01 +00:00
|
|
|
, librsvg
|
|
|
|
, sassc
|
|
|
|
, which
|
2022-08-12 12:06:08 +00:00
|
|
|
, themeVariants ? [] # default: blue
|
|
|
|
, colorVariants ? [] # default: all
|
|
|
|
, tweaks ? []
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
let
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "qogir-theme";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
lib.checkListOfEnum "${pname}: theme variants" [ "default" "manjaro" "ubuntu" "all" ] themeVariants
|
|
|
|
lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants
|
|
|
|
lib.checkListOfEnum "${pname}: tweaks" [ "image" "square" "round" ] tweaks
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit pname;
|
|
|
|
version = "2022-07-17";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "NGgTToaSJBwmHnZjWbJ3dSJg9Mmfchj3W0xgK0CMb9M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
jdupes
|
2021-12-06 16:07:01 +00:00
|
|
|
sassc
|
|
|
|
which
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = [
|
|
|
|
gdk-pixbuf # pixbuf engine for Gtk2
|
|
|
|
gnome-themes-extra # adwaita engine for Gtk2
|
|
|
|
librsvg # pixbuf loader for svg
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedUserEnvPkgs = [
|
|
|
|
gtk-engine-murrine # murrine engine for Gtk2
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs install.sh clean-old-theme.sh
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2022-08-12 12:06:08 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/share/themes
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
name= HOME="$TMPDIR" ./install.sh \
|
|
|
|
${lib.optionalString (themeVariants != []) "--theme " + builtins.toString themeVariants} \
|
|
|
|
${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \
|
|
|
|
${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \
|
|
|
|
--dest $out/share/themes
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/share/doc/${pname}
|
|
|
|
cp -a src/firefox $out/share/doc/${pname}
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
rm $out/share/themes/*/{AUTHORS,COPYING}
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
jdupes --link-soft --recurse $out/share
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Flat Design theme for GTK based desktop environments";
|
|
|
|
homepage = "https://vinceliuice.github.io/Qogir-theme";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|