diff options
author | José Romildo Malaquias <malaquias@gmail.com> | 2022-07-19 07:43:49 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 12:43:49 +0200 |
commit | a8df6f3109133c25e00c610e485ca056fd27f276 (patch) | |
tree | ddfe8a6fc81e2fd753f211ee4455e809bb99bbc0 /pkgs/data/themes/qogir/default.nix | |
parent | 68a5324535df90c6d08a1e9f86e6487a53bfafd6 (diff) | |
download | nixpkgs-a8df6f3109133c25e00c610e485ca056fd27f276.tar nixpkgs-a8df6f3109133c25e00c610e485ca056fd27f276.tar.gz nixpkgs-a8df6f3109133c25e00c610e485ca056fd27f276.tar.bz2 nixpkgs-a8df6f3109133c25e00c610e485ca056fd27f276.tar.lz nixpkgs-a8df6f3109133c25e00c610e485ca056fd27f276.tar.xz nixpkgs-a8df6f3109133c25e00c610e485ca056fd27f276.tar.zst nixpkgs-a8df6f3109133c25e00c610e485ca056fd27f276.zip |
qogir-theme: 2022-05-29 -> 2022-07-17 (#181761)
* qogir-theme: 2022-05-29 -> 2022-07-17 * qogir-theme: replace duplicate files with links * qogir-theme: move patchShebangs to post patch phase * qogir-theme: run pre and post install hooks * qogir-theme: add optional arguments
Diffstat (limited to 'pkgs/data/themes/qogir/default.nix')
-rw-r--r-- | pkgs/data/themes/qogir/default.nix | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/pkgs/data/themes/qogir/default.nix b/pkgs/data/themes/qogir/default.nix index b447ab4230b..f6ea2c61aa8 100644 --- a/pkgs/data/themes/qogir/default.nix +++ b/pkgs/data/themes/qogir/default.nix @@ -1,27 +1,40 @@ { lib , stdenv , fetchFromGitHub +, gitUpdater , gdk-pixbuf , gnome-themes-extra , gtk-engine-murrine +, jdupes , librsvg , sassc , which -, gitUpdater +, themeVariants ? [] # default: blue +, colorVariants ? [] # default: all +, tweaks ? [] }: -stdenv.mkDerivation rec { +let pname = "qogir-theme"; - version = "2022-05-29"; + +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"; src = fetchFromGitHub { owner = "vinceliuice"; repo = pname; rev = version; - sha256 = "z8o/1Qc7XmefX9CuVr0Gq2MmKw2NlkUk+5Lz0Z593do="; + sha256 = "NGgTToaSJBwmHnZjWbJ3dSJg9Mmfchj3W0xgK0CMb9M="; }; nativeBuildInputs = [ + jdupes sassc which ]; @@ -36,13 +49,29 @@ stdenv.mkDerivation rec { gtk-engine-murrine # murrine engine for Gtk2 ]; + postPatch = '' + patchShebangs install.sh clean-old-theme.sh + ''; + installPhase = '' - patchShebangs . + runHook preInstall + mkdir -p $out/share/themes - name= HOME="$TMPDIR" ./install.sh -t all -d $out/share/themes + + 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 + mkdir -p $out/share/doc/${pname} cp -a src/firefox $out/share/doc/${pname} + rm $out/share/themes/*/{AUTHORS,COPYING} + + jdupes --link-soft --recurse $out/share + + runHook postInstall ''; passthru.updateScript = gitUpdater { inherit pname version; }; |