From ac95ddb008a03fa438f9ad271332ccdb2dbf033f Mon Sep 17 00:00:00 2001
From: Daiderd Jordan <daiderd@gmail.com>
Date: Sun, 19 Aug 2018 12:24:04 +0200
Subject: [PATCH] gtk3: propagate Cocoa on darwin

Generally frameworks should not be propagated, but in this case it's
always needed so we propagate (only) Cocoa.
---
 pkgs/development/libraries/gtk+/3.x.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix
index 22e48c8ba7a6..27052d1922f6 100644
--- a/pkgs/development/libraries/gtk+/3.x.nix
+++ b/pkgs/development/libraries/gtk+/3.x.nix
@@ -38,10 +38,11 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [ libxkbcommon epoxy json-glib ]
-    ++ optionals stdenv.isDarwin [ AppKit Cocoa ];
+    ++ optional stdenv.isDarwin AppKit;
   propagatedBuildInputs = with xorg; with stdenv.lib;
     [ expat glib cairo pango gdk_pixbuf atk at-spi2-atk gnome3.gsettings-desktop-schemas
       libXrandr libXrender libXcomposite libXi libXcursor libSM libICE ]
+    ++ optional stdenv.isDarwin Cocoa  # explicitly propagated, always needed
     ++ optionals waylandSupport [ mesa_noglu wayland wayland-protocols ]
     ++ optional xineramaSupport libXinerama
     ++ optional cupsSupport cups;