git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #151189 from NickCao/gtk2

gtk2: fix cross compilation

commit970475140161916d0338b01aba67054bb2983ea6 authorJanne Heß <janne@hess.ooo> dateSat 18 Dec 2021, 21:34 (5 years ago) parent725578abe894db
1 file changed+5−1
pkgs/development/libraries/gtk/2.x.nix+5−1
pkgs/development/libraries/gtk/2.x.nix+5−1
@@ -4,7 +4,7 @@
44, cupsSupport ? config.gtk2.cups or stdenv.isLinux, cups
55, gdktarget ? if stdenv.isDarwin then "quartz" else "x11"
66, AppKit, Cocoa
7−, fetchpatch
7+, fetchpatch, buildPackages
88}:
99
1010with lib;
@@ -38,6 +38,7 @@ stdenv.mkDerivation rec {
3838 gtkCleanImmodulesCache
3939 ];
4040
41+
4142 nativeBuildInputs = setupHooks ++ [ perl pkg-config gettext gobject-introspection ];
4243
4344 patches = [
@@ -72,6 +73,9 @@ stdenv.mkDerivation rec {
7273 "--disable-glibtest"
7374 "--disable-introspection"
7475 "--disable-visibility"
76+ ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
77+ "ac_cv_path_GTK_UPDATE_ICON_CACHE=${buildPackages.gtk2}/bin/gtk-update-icon-cache"
78+ "ac_cv_path_GDK_PIXBUF_CSOURCE=${buildPackages.gdk-pixbuf.dev}/bin/gdk-pixbuf-csource"
7579 ];
7680
7781 doCheck = false; # needs X11