gtk: split hooks so gtk2 can use hicolor hook
This commit is contained in:
parent
b7ad6e1be5
commit
b3995d40be
@ -25,9 +25,12 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
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 = [
|
patches = [
|
||||||
./2.0-immodules.cache.patch
|
./2.0-immodules.cache.patch
|
||||||
|
@ -49,7 +49,10 @@ stdenv.mkDerivation rec {
|
|||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
outputBin = "dev";
|
outputBin = "dev";
|
||||||
|
|
||||||
setupHook = ./gtk3-setup-hook.sh;
|
setupHooks = [
|
||||||
|
./gtk3-clean-immodules-cache.sh
|
||||||
|
./drop-icon-theme-cache.sh
|
||||||
|
];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz";
|
url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz";
|
||||||
@ -108,7 +111,7 @@ stdenv.mkDerivation rec {
|
|||||||
pkgconfig
|
pkgconfig
|
||||||
python3
|
python3
|
||||||
sassc
|
sassc
|
||||||
setupHook
|
setupHooks
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
# shellcheck shell=bash
|
# 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.
|
# 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.
|
# However, since each package is installed to its own prefix, the files will only collide.
|
||||||
dropIconThemeCache() {
|
dropIconThemeCache() {
|
@ -1,8 +1,10 @@
|
|||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
fixupOutputHooks+=(_gtk2CleanComments)
|
fixupOutputHooks+=(_gtk2CleanComments)
|
||||||
|
|
||||||
# Clean comments that link to generator of the file
|
# Clean comments that link to generator of the file
|
||||||
_gtk2CleanComments() {
|
_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
|
if [ -f "$f" ]; then
|
||||||
sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
|
sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
|
||||||
fi
|
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…
x
Reference in New Issue
Block a user