Merge pull request #44630 from LnL7/darwin-gtk-x11

gtk3: add x11Support for darwin
This commit is contained in:
Daiderd Jordan 2018-08-18 22:14:33 +02:00 committed by GitHub
commit 0ad3721616
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 12 deletions

View file

@ -10,6 +10,7 @@
, dbus
, glib
, libxml2
, fixDarwinDylibNames
, gnome3 # To pass updateScript
}:
@ -24,7 +25,9 @@ stdenv.mkDerivation rec {
sha256 = "0vkan52ab9vrkknnv8y4f1cspk8x7xd10qx92xk9ys71p851z2b1";
};
nativeBuildInputs = [ meson ninja pkgconfig ];
nativeBuildInputs = [ meson ninja pkgconfig ]
# Fixup rpaths because of meson, remove with meson-0.47
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = [ at-spi2-core atk dbus glib libxml2 ];
doCheck = false; # fails with "No test data file provided"

View file

@ -11,6 +11,7 @@
, libX11
, libXtst # at-spi2-core can be build without X support, but due it is a client-side library, GUI-less usage is a very rare case
, libXi
, fixDarwinDylibNames
, gnome3 # To pass updateScript
}:
@ -27,7 +28,9 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
nativeBuildInputs = [ meson ninja pkgconfig gobjectIntrospection ];
nativeBuildInputs = [ meson ninja pkgconfig gobjectIntrospection ]
# Fixup rpaths because of meson, remove with meson-0.47
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = [ dbus glib libX11 libXtst libXi ];
doCheck = false; # fails with "AT-SPI: Couldn't connect to accessibility bus. Is at-spi-bus-launcher running?"

View file

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

View file

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

View file

@ -9671,7 +9671,6 @@ with pkgs;
gtk2 = callPackage ../development/libraries/gtk+/2.x.nix {
cupsSupport = config.gtk2.cups or stdenv.isLinux;
gdktarget = if stdenv.isDarwin then "quartz" else "x11";
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa;
};
@ -9679,7 +9678,9 @@ with pkgs;
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 { };
gtkmm3 = callPackage ../development/libraries/gtkmm/3.x.nix { };
@ -17320,7 +17321,7 @@ with pkgs;
minitube = libsForQt5.callPackage ../applications/video/minitube { };
mimic = callPackage ../applications/audio/mimic {
mimic = callPackage ../applications/audio/mimic {
pulseaudioSupport = config.pulseaudio or false;
};