about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-05-20 23:45:56 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2018-05-21 19:57:01 -0500
commit9b8b29f17518ff64c128d04d3fda37da99301877 (patch)
tree4999f793b775dd7000975aa45c7d8bba60d7c181
parent9eb0301eb24883e49e3264b7bf6c574c165b033b (diff)
gtk2: fix GNOME bug #557780
URL: https://gitlab.gnome.org/GNOME/gtk/issues/303

This patch will fix the assertion generated at startup for freeciv on
macOS. Conditionally applied on Darwin.

Gdk:ERROR:gdkimage-quartz.c:250:_gdk_image_new_for_depth: assertion failed: (depth == 24 || depth == 32)
-rw-r--r--pkgs/development/libraries/gtk+/2.x.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix
index d35e47f312f9f..d87cf25e690cd 100644
--- a/pkgs/development/libraries/gtk+/2.x.nix
+++ b/pkgs/development/libraries/gtk+/2.x.nix
@@ -4,6 +4,7 @@
 , cupsSupport ? true, cups ? null
 , gdktarget ? "x11"
 , AppKit, Cocoa
+, fetchpatch
 }:
 
 assert xineramaSupport -> xorg.libXinerama != null;
@@ -28,7 +29,13 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ setupHook perl pkgconfig gettext gobjectIntrospection ];
 
-  patches = [ ./2.0-immodules.cache.patch ./gtk2-theme-paths.patch ];
+  patches = [
+    ./2.0-immodules.cache.patch
+    ./gtk2-theme-paths.patch
+  ] ++ optional stdenv.isDarwin (fetchpatch {
+    url = https://bug557780.bugzilla-attachments.gnome.org/attachment.cgi?id=306776;
+    sha256 = "0sp8f1r5c4j2nlnbqgv7s7nxa4cfwigvm033hvhb1ld652pjag4r";
+  });
 
   propagatedBuildInputs = with xorg;
     [ glib cairo pango gdk_pixbuf atk ]