summary refs log tree commit diff
path: root/pkgs/development/libraries/gtk+/3.x.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/gtk+/3.x.nix')
-rw-r--r--pkgs/development/libraries/gtk+/3.x.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix
index 248c4fa385e1..f738f76ca029 100644
--- a/pkgs/development/libraries/gtk+/3.x.nix
+++ b/pkgs/development/libraries/gtk+/3.x.nix
@@ -3,11 +3,14 @@
 , xlibs, x11, wayland, libxkbcommon, epoxy
 , xineramaSupport ? stdenv.isLinux
 , cupsSupport ? stdenv.isLinux, cups ? null
+, darwin
 }:
 
 assert xineramaSupport -> xlibs.libXinerama != null;
 assert cupsSupport -> cups != null;
 
+with stdenv.lib;
+
 let
   ver_maj = "3.18";
   ver_min = "5";
@@ -27,6 +30,7 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = with xlibs; with stdenv.lib;
     [ expat glib cairo pango gdk_pixbuf atk at_spi2_atk libXrandr libXrender libXcomposite libXi libXcursor ]
     ++ optionals stdenv.isLinux [ wayland ]
+    ++ optional stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Cocoa ])
     ++ optional xineramaSupport libXinerama
     ++ optional cupsSupport cups;
 
@@ -37,6 +41,14 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  configureFlags = optional stdenv.isDarwin [
+    "--disable-debug"
+    "--disable-dependency-tracking"
+    "--disable-glibtest"
+    "--with-gdktarget=quartz"
+    "--enable-quartz-backend"
+  ];
+
   postInstall = "rm -rf $out/share/gtk-doc";
 
   passthru = {