From 9b8b29f17518ff64c128d04d3fda37da99301877 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 20 May 2018 23:45:56 -0500 Subject: [PATCH] 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) --- pkgs/development/libraries/gtk+/2.x.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix index d35e47f312f9..d87cf25e690c 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 ]