gtk: split hooks so gtk2 can use hicolor hook
This commit is contained in:
parent
b7ad6e1be5
commit
b3995d40be
5 changed files with 24 additions and 15 deletions
|
@ -25,9 +25,12 @@ stdenv.mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
setupHooks = [
|
||||
./gtk2-clean-immodules-cache.sh
|
||||
./drop-icon-theme-cache.sh
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ setupHook perl pkgconfig gettext gobject-introspection ];
|
||||
nativeBuildInputs = [ setupHooks perl pkgconfig gettext gobject-introspection ];
|
||||
|
||||
patches = [
|
||||
./2.0-immodules.cache.patch
|
||||
|
|
|
@ -49,7 +49,10 @@ stdenv.mkDerivation rec {
|
|||
outputs = [ "out" "dev" ];
|
||||
outputBin = "dev";
|
||||
|
||||
setupHook = ./gtk3-setup-hook.sh;
|
||||
setupHooks = [
|
||||
./gtk3-clean-immodules-cache.sh
|
||||
./drop-icon-theme-cache.sh
|
||||
];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz";
|
||||
|
@ -108,7 +111,7 @@ stdenv.mkDerivation rec {
|
|||
pkgconfig
|
||||
python3
|
||||
sassc
|
||||
setupHook
|
||||
setupHooks
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
fixupOutputHooks+=(_gtk3CleanComments)
|
||||
|
||||
# Clean comments that link to generator of the file
|
||||
_gtk3CleanComments() {
|
||||
local f="${prefix:?}/lib/gtk-3.0/3.0.0/immodules.cache"
|
||||
if [ -f "$f" ]; then
|
||||
sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
|
||||
fi
|
||||
}
|
||||
|
||||
# Packages often run gtk-update-icon-cache to include their icons in themes’ icon cache.
|
||||
# However, since each package is installed to its own prefix, the files will only collide.
|
||||
dropIconThemeCache() {
|
|
@ -1,8 +1,10 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
fixupOutputHooks+=(_gtk2CleanComments)
|
||||
|
||||
# Clean comments that link to generator of the file
|
||||
_gtk2CleanComments() {
|
||||
local f="$prefix/lib/gtk-2.0/2.10.0/immodules.cache"
|
||||
local f="${prefix:?}/lib/gtk-2.0/2.10.0/immodules.cache"
|
||||
if [ -f "$f" ]; then
|
||||
sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
|
||||
fi
|
11
pkgs/development/libraries/gtk/gtk3-clean-immodules-cache.sh
Normal file
11
pkgs/development/libraries/gtk/gtk3-clean-immodules-cache.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
fixupOutputHooks+=(_gtk3CleanComments)
|
||||
|
||||
# Clean comments that link to generator of the file
|
||||
_gtk3CleanComments() {
|
||||
local f="${prefix:?}/lib/gtk-3.0/3.0.0/immodules.cache"
|
||||
if [ -f "$f" ]; then
|
||||
sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
|
||||
fi
|
||||
}
|
Loading…
Reference in a new issue