summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-01-08 00:18:33 +0100
committerGitHub <noreply@github.com>2017-01-08 00:18:33 +0100
commit826d6aa6cd555775f384774d0de4a4b2a759b8b9 (patch)
tree0a994b43b63d1b98c917ba8b93c6ce00f79dbad1 /pkgs/development/libraries
parent9fdbb624e37c2de1dc0a6e088c3b3d403b12407d (diff)
parentf025d2c1898a5697ca109d51412850375883db44 (diff)
downloadnixpkgs-826d6aa6cd555775f384774d0de4a4b2a759b8b9.tar
nixpkgs-826d6aa6cd555775f384774d0de4a4b2a759b8b9.tar.gz
nixpkgs-826d6aa6cd555775f384774d0de4a4b2a759b8b9.tar.bz2
nixpkgs-826d6aa6cd555775f384774d0de4a4b2a759b8b9.tar.lz
nixpkgs-826d6aa6cd555775f384774d0de4a4b2a759b8b9.tar.xz
nixpkgs-826d6aa6cd555775f384774d0de4a4b2a759b8b9.tar.zst
nixpkgs-826d6aa6cd555775f384774d0de4a4b2a759b8b9.zip
Merge pull request #21382 from johbo/darwin-pygtk-quartz-backend
Darwin gtk2/pygtk quartz backend
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/cairo/default.nix5
-rw-r--r--pkgs/development/libraries/gtk+/2.x.nix17
-rw-r--r--pkgs/development/libraries/gtk-mac-integration/default.nix30
-rw-r--r--pkgs/development/libraries/pango/default.nix11
4 files changed, 54 insertions, 9 deletions
diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix
index 5d201c52312..5b40f27674d 100644
--- a/pkgs/development/libraries/cairo/default.nix
+++ b/pkgs/development/libraries/cairo/default.nix
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
     libiconv
   ] ++ libintlOrEmpty ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
     CoreGraphics
-    ApplicationServices
+    CoreText
     Carbon
   ]);
 
@@ -56,6 +56,9 @@ stdenv.mkDerivation rec {
     ++ optionals xcbSupport [ libxcb xcbutil ]
     ++ optional gobjectSupport glib
     ++ optional glSupport mesa_noglu
+    ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+      ApplicationServices
+    ])
     ; # TODO: maybe liblzo but what would it be for here?
 
   configureFlags = if stdenv.isDarwin then [
diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix
index ba12b4eea93..bcbbecd242d 100644
--- a/pkgs/development/libraries/gtk+/2.x.nix
+++ b/pkgs/development/libraries/gtk+/2.x.nix
@@ -2,11 +2,15 @@
 , gdk_pixbuf, libintlOrEmpty, xlibsWrapper
 , xineramaSupport ? stdenv.isLinux
 , cupsSupport ? true, cups ? null
+, gdktarget ? "x11"
+, AppKit, Cocoa
 }:
 
 assert xineramaSupport -> xorg.libXinerama != null;
 assert cupsSupport -> cups != null;
 
+with stdenv.lib;
+
 stdenv.mkDerivation rec {
   name = "gtk+-2.24.31";
 
@@ -20,7 +24,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (libintlOrEmpty != []) "-lintl";
+  NIX_CFLAGS_COMPILE = optionalString (libintlOrEmpty != []) "-lintl";
 
   setupHook = ./setup-hook.sh;
 
@@ -28,7 +32,7 @@ stdenv.mkDerivation rec {
 
   patches = [ ./2.0-immodules.cache.patch ];
 
-  propagatedBuildInputs = with xorg; with stdenv.lib;
+  propagatedBuildInputs = with xorg;
     [ glib cairo pango gdk_pixbuf atk ]
     ++ optionals (stdenv.isLinux || stdenv.isDarwin) [
          libXrandr libXrender libXcomposite libXi libXcursor
@@ -36,11 +40,13 @@ stdenv.mkDerivation rec {
     ++ optionals stdenv.isDarwin [ xlibsWrapper libXdamage ]
     ++ libintlOrEmpty
     ++ optional xineramaSupport libXinerama
-    ++ optionals cupsSupport [ cups ];
+    ++ optionals cupsSupport [ cups ]
+    ++ optionals (gdktarget == "quartz") [ AppKit Cocoa ];
 
   configureFlags = [
+    "--with-gdktarget=${gdktarget}"
     "--with-xinput=yes"
-  ] ++ stdenv.lib.optionals stdenv.isDarwin [
+  ] ++ optionals stdenv.isDarwin [
     "--disable-glibtest"
     "--disable-introspection"
     "--disable-visibility"
@@ -57,9 +63,10 @@ stdenv.mkDerivation rec {
       rm $out/lib/gtk-2.0/2.10.0/immodules.cache
       $out/bin/gtk-query-immodules-2.0 $out/lib/gtk-2.0/2.10.0/immodules/*.so > $out/lib/gtk-2.0/2.10.0/immodules.cache
     ''; # workaround for bug of nix-mode for Emacs */ '';
+    inherit gdktarget;
   };
 
-  meta = with stdenv.lib; {
+  meta = {
     description = "A multi-platform toolkit for creating graphical user interfaces";
     homepage    = http://www.gtk.org/;
     license     = licenses.lgpl2Plus;
diff --git a/pkgs/development/libraries/gtk-mac-integration/default.nix b/pkgs/development/libraries/gtk-mac-integration/default.nix
new file mode 100644
index 00000000000..30ac8f2fe28
--- /dev/null
+++ b/pkgs/development/libraries/gtk-mac-integration/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig, glib, gtk_doc, gtk }:
+
+stdenv.mkDerivation rec {
+  name = "gtk-mac-integration-2.0.8";
+
+  src = fetchFromGitHub {
+    owner = "GNOME";
+    repo = "gtk-mac-integration";
+    rev = "79e708870cdeea24ecdb036c77b4630104ae1776";
+    sha256 = "1fbhnvj0rqc3089ypvgnpkp6ad2rr37v5qk38008dgamb9h7f3qs";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig gtk_doc ];
+  buildInputs = [ glib gtk ];
+
+  preAutoreconf = ''
+    gtkdocize
+  '';
+
+  meta = with lib; {
+    description = "Provides integration for Gtk+ applications into the Mac desktop";
+
+    license = licenses.lgpl21;
+
+    homepage = https://wiki.gnome.org/Projects/GTK+/OSX/Integration;
+
+    maintainers = [ maintainers.matthewbauer ];
+    platforms = platforms.darwin;
+  };
+}
diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix
index f39fc2afe7d..22cf7be84d0 100644
--- a/pkgs/development/libraries/pango/default.nix
+++ b/pkgs/development/libraries/pango/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, libXft, cairo, harfbuzz
-, libintlOrEmpty, gobjectIntrospection
+, libintlOrEmpty, gobjectIntrospection, darwin
 }:
 
 with stdenv.lib;
@@ -19,7 +19,12 @@ stdenv.mkDerivation rec {
   outputs = [ "bin" "dev" "out" "devdoc" ];
 
   buildInputs = [ gobjectIntrospection ];
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig ]
+    ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+       Carbon
+       CoreGraphics
+       CoreText
+    ]);
   propagatedBuildInputs = [ cairo harfbuzz libXft ] ++ libintlOrEmpty;
 
   enableParallelBuilding = true;
@@ -48,6 +53,6 @@ stdenv.mkDerivation rec {
     license = licenses.lgpl2Plus;
 
     maintainers = with maintainers; [ raskin urkud ];
-    platforms = with platforms; linux ++ darwin;
+    platforms = platforms.linux ++ platforms.darwin;
   };
 }