Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions pkgs/development/libraries/wxwidgets/wxGTK31.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,26 @@
, compat28 ? false
, compat30 ? true
, unicode ? true
, withGtk2 ? true
, withGtk2 ? (!stdenv.isDarwin)
, withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
, withWebKit ? false, webkitgtk
, darwin
, withWebKit ? stdenv.isDarwin
, webkitgtk
, setfile
, AGL
, Carbon
, Cocoa
, Kernel
, QTKit
, AVFoundation
, AVKit
, WebKit
}:

assert withMesa -> libGLU != null && libGL != null;
assert withWebKit -> webkitgtk != null;
assert withWebKit -> stdenv.isDarwin;

assert withGtk2 -> (!withWebKit);

let
inherit (darwin.stubs) setfile;
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit;
inherit (gnome2) GConf;
inherit (gst_all_1) gst-plugins-base gstreamer;
gtk = if withGtk2 then gtk2 else gtk3;
Expand All @@ -57,6 +63,8 @@ stdenv.mkDerivation rec {
buildInputs = [
gst-plugins-base
gstreamer
]
++ lib.optionals (!stdenv.isDarwin) [
gtk
libSM
libXinerama
Expand All @@ -68,30 +76,34 @@ stdenv.mkDerivation rec {
GConf
]
++ lib.optional withMesa libGLU
++ lib.optional withWebKit webkitgtk
++ lib.optional (withWebKit && !stdenv.isDarwin) webkitgtk
++ lib.optional (withWebKit && stdenv.isDarwin) WebKit
++ lib.optionals stdenv.isDarwin [
setfile
Carbon
Cocoa
Kernel
QTKit
setfile
AVFoundation
AVKit
WebKit
];

propagatedBuildInputs = lib.optional stdenv.isDarwin AGL;

configureFlags = [
"--disable-precomp-headers"
# This is the default option, but be explicit
"--disable-monolithic"
"--enable-mediactrl"
(if compat28 then "--enable-compat28" else "--disable-compat28")
(if compat30 then "--enable-compat30" else "--disable-compat30")
]
++ lib.optional unicode "--enable-unicode"
++ lib.optional withMesa "--with-opengl"
++ lib.optionals stdenv.isDarwin [
# allow building on 64-bit
"--enable-universal-binaries"
"--with-cocoa"
"--with-macosx-version-min=10.7"
"--with-osx_cocoa"
"--with-libiconv"
]
++ lib.optionals withWebKit [
"--enable-webview"
Expand Down Expand Up @@ -139,7 +151,6 @@ stdenv.mkDerivation rec {
license = licenses.wxWindows;
maintainers = with maintainers; [ AndersonTorres tfmoraes ];
platforms = platforms.unix;
badPlatforms = platforms.darwin; # ofBorg is failing, don't know if internal
};

passthru = {
Expand Down
5 changes: 4 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20727,7 +20727,10 @@ with pkgs;

wxmac = callPackage ../development/libraries/wxwidgets/wxmac30.nix { };

wxGTK31 = callPackage ../development/libraries/wxwidgets/wxGTK31.nix { };
wxGTK31 = callPackage ../development/libraries/wxwidgets/wxGTK31.nix {
inherit (darwin.stubs) setfile;
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit AVFoundation AVKit WebKit;
};
wxGTK31-gtk2 = wxGTK31.override { withGtk2 = true; };
wxGTK31-gtk3 = wxGTK31.override { withGtk2 = false; };

Expand Down