gtk3: add x11Support for darwin

This commit is contained in:
Daiderd Jordan 2018-08-06 23:32:13 +02:00
parent 955f391e29
commit 2286655abd
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
3 changed files with 12 additions and 10 deletions

View File

@ -2,7 +2,7 @@
, gdk_pixbuf, xlibsWrapper, gobjectIntrospection , gdk_pixbuf, xlibsWrapper, gobjectIntrospection
, xineramaSupport ? stdenv.isLinux , xineramaSupport ? stdenv.isLinux
, cupsSupport ? true, cups ? null , cupsSupport ? true, cups ? null
, gdktarget ? "x11" , gdktarget ? if stdenv.isDarwin then "quartz" else "x11"
, AppKit, Cocoa , AppKit, Cocoa
, fetchpatch , fetchpatch
}: }:

View File

@ -1,10 +1,11 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, gettext, perl, makeWrapper, shared-mime-info { stdenv, fetchurl, fetchpatch, pkgconfig, gettext, perl, makeWrapper, shared-mime-info
, expat, glib, cairo, pango, gdk_pixbuf, atk, at-spi2-atk, gobjectIntrospection , expat, glib, cairo, pango, gdk_pixbuf, atk, at-spi2-atk, gobjectIntrospection
, xorg, epoxy, json-glib, libxkbcommon, gmp , xorg, epoxy, json-glib, libxkbcommon, gmp, gnome3
, x11Support ? stdenv.isLinux
, waylandSupport ? stdenv.isLinux, mesa_noglu, wayland, wayland-protocols , waylandSupport ? stdenv.isLinux, mesa_noglu, wayland, wayland-protocols
, xineramaSupport ? stdenv.isLinux , xineramaSupport ? stdenv.isLinux
, cupsSupport ? stdenv.isLinux, cups ? null , cupsSupport ? stdenv.isLinux, cups ? null
, darwin, gnome3 , AppKit, Cocoa
}: }:
assert cupsSupport -> cups != null; assert cupsSupport -> cups != null;
@ -36,12 +37,12 @@ stdenv.mkDerivation rec {
}) })
]; ];
buildInputs = [ libxkbcommon epoxy json-glib ]; buildInputs = [ libxkbcommon epoxy json-glib ]
++ optionals stdenv.isDarwin [ AppKit Cocoa ];
propagatedBuildInputs = with xorg; with stdenv.lib; propagatedBuildInputs = with xorg; with stdenv.lib;
[ expat glib cairo pango gdk_pixbuf atk at-spi2-atk gnome3.gsettings-desktop-schemas [ expat glib cairo pango gdk_pixbuf atk at-spi2-atk gnome3.gsettings-desktop-schemas
libXrandr libXrender libXcomposite libXi libXcursor libSM libICE ] libXrandr libXrender libXcomposite libXi libXcursor libSM libICE ]
++ optionals waylandSupport [ mesa_noglu wayland wayland-protocols ] ++ optionals waylandSupport [ mesa_noglu wayland wayland-protocols ]
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Cocoa ])
++ optional xineramaSupport libXinerama ++ optional xineramaSupport libXinerama
++ optional cupsSupport cups; ++ optional cupsSupport cups;
#TODO: colord? #TODO: colord?
@ -55,9 +56,9 @@ stdenv.mkDerivation rec {
"--disable-debug" "--disable-debug"
"--disable-dependency-tracking" "--disable-dependency-tracking"
"--disable-glibtest" "--disable-glibtest"
"--with-gdktarget=quartz" ] ++ optional (stdenv.isDarwin && !x11Support)
"--enable-quartz-backend" "--enable-quartz-backend"
] ++ optional stdenv.isLinux [ ++ optional x11Support [
"--enable-x11-backend" "--enable-x11-backend"
] ++ optional waylandSupport [ ] ++ optional waylandSupport [
"--enable-wayland-backend" "--enable-wayland-backend"

View File

@ -9671,7 +9671,6 @@ with pkgs;
gtk2 = callPackage ../development/libraries/gtk+/2.x.nix { gtk2 = callPackage ../development/libraries/gtk+/2.x.nix {
cupsSupport = config.gtk2.cups or stdenv.isLinux; cupsSupport = config.gtk2.cups or stdenv.isLinux;
gdktarget = if stdenv.isDarwin then "quartz" else "x11";
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; inherit (darwin.apple_sdk.frameworks) AppKit Cocoa;
}; };
@ -9679,7 +9678,9 @@ with pkgs;
gdktarget = "x11"; gdktarget = "x11";
}; };
gtk3 = callPackage ../development/libraries/gtk+/3.x.nix { }; gtk3 = callPackage ../development/libraries/gtk+/3.x.nix {
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa;
};
gtkmm2 = callPackage ../development/libraries/gtkmm/2.x.nix { }; gtkmm2 = callPackage ../development/libraries/gtkmm/2.x.nix { };
gtkmm3 = callPackage ../development/libraries/gtkmm/3.x.nix { }; gtkmm3 = callPackage ../development/libraries/gtkmm/3.x.nix { };