gtk: use one clean-immodules-cache setup-hook

Use one hook with substituteAll instead
of duplicating the hook for every version.
This commit is contained in:
WORLDofPEACE
2021-02-21 13:07:20 +00:00
committed by github-actions[bot]
parent e3d3643f1b
commit 45bdf88043
7 changed files with 53 additions and 39 deletions
+12 -1
View File
@@ -1,5 +1,6 @@
{ lib
, stdenv
, substituteAll
, fetchurl
, pkg-config
, gettext
@@ -53,6 +54,16 @@
assert cupsSupport -> cups != null;
let
gtkCleanImmodulesCache = substituteAll {
src = ./hooks/clean-immodules-cache.sh;
gtk_module_path = "gtk-4.0";
gtk_binary_version = "4.0.0";
};
in
stdenv.mkDerivation rec {
pname = "gtk4";
version = "4.0.3";
@@ -61,8 +72,8 @@ stdenv.mkDerivation rec {
outputBin = "dev";
setupHooks = [
./hooks/gtk4-clean-immodules-cache.sh
./hooks/drop-icon-theme-cache.sh
gtkCleanImmodulesCache
];
src = fetchurl {