summaryrefslogtreecommitdiffstats
path: root/pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh')
-rw-r--r--pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh b/pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh
new file mode 100644
index 000000000000..49f7051aabb6
--- /dev/null
+++ b/pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh
@@ -0,0 +1,11 @@
+# shellcheck shell=bash
+
+fixupOutputHooks+=(_gtk4CleanComments)
+
+# Clean comments that link to generator of the file
+_gtk4CleanComments() {
+ local f="${prefix:?}/lib/gtk-4.0/4.0.0/immodules.cache"
+ if [ -f "$f" ]; then
+ sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
+ fi
+}