qogir-icon-theme: 2022-01-12 -> 2022-07-20 (#182121)

* qogir-icon-theme: add update script

* qogir-icon-theme: move patchShebangs to post patch phase

* qogir-icon-theme: use soft links instead of hard links

* qogir-icon-theme: 2022-01-12 -> 2022-07-20

* qogir-icon-theme: add optional arguments
This commit is contained in:
José Romildo Malaquias 2022-07-22 10:50:41 -03:00 committed by GitHub
parent 15ee3ad767
commit e0e2c0cbc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,20 +1,30 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, gitUpdater
, gtk3
, hicolor-icon-theme
, jdupes
, colorVariants ? [] # default is all
, themeVariants ? [] # default is all
}:
stdenvNoCC.mkDerivation rec {
let
pname = "qogir-icon-theme";
version = "2022-01-12";
in
lib.checkListOfEnum "${pname}: color variants" [ "default" "dark" "all" ] colorVariants
lib.checkListOfEnum "${pname}: theme variants" [ "default" "manjaro" "ubuntu" "all" ] themeVariants
stdenvNoCC.mkDerivation rec {
inherit pname;
version = "2022-07-20";
src = fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = version;
sha256 = "1daayxsqh7di3bvfnl39h1arsj1fypd3ba30mas6dl1d0qy17z1p";
sha256 = "sha256-I+eojCTR3fXcp7v5Bdie9vstmJja9HB71aQSF5jLDD4=";
};
nativeBuildInputs = [ gtk3 jdupes ];
@ -27,15 +37,27 @@ stdenvNoCC.mkDerivation rec {
dontPatchELF = true;
dontRewriteSymlinks = true;
postPatch = ''
patchShebangs install.sh
'';
installPhase = ''
runHook preInstall
patchShebangs install.sh
mkdir -p $out/share/icons
name= ./install.sh -d $out/share/icons
jdupes -L -r $out/share/icons
name= ./install.sh \
${lib.optionalString (themeVariants != []) ("--theme " + builtins.toString themeVariants)} \
${lib.optionalString (colorVariants != []) ("--color " + builtins.toString colorVariants)} \
--dest $out/share/icons
jdupes --quiet --link-soft --recurse $out/share
runHook postInstall
'';
passthru.updateScript = gitUpdater { inherit pname version; };
meta = with lib; {
description = "Flat colorful design icon theme";
homepage = "https://github.com/vinceliuice/Qogir-icon-theme";