Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: wxwidgets: fix build on darwin #150908

Closed
wants to merge 3 commits into from
Closed
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
7 changes: 3 additions & 4 deletions pkgs/development/libraries/wxwidgets/3.0/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
, libGLU, libGL
, compat24 ? false, compat26 ? true, unicode ? true
, withGtk2 ? true
, withWebKit ? false, webkitgtk
, AGL, Carbon, Cocoa, Kernel, QTKit
, withWebKit ? !stdenv.isDarwin, webkitgtk # Disable webkitgtk on darwin pending #126101
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the original value was already false, so setting it to !stdenv.isDarwin would enable it on non-darwin. And I don't see any override in all-packages.nix

Suggested change
, withWebKit ? !stdenv.isDarwin, webkitgtk # Disable webkitgtk on darwin pending #126101
, withWebKit ? false, webkitgtk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Does that mean that the original version would be preferable (to modify buildInputs to ++ optional (withWebKit && !stdenv.isDarwin) webkitgtk # Disable webkitgtk on darwin pending #126101)? That way all-packages doesn't need a bunch of darwin overrides for each way it gets called? If so, can update accordingly.

, AGL, AVFoundation, Carbon, Cocoa, Kernel, QTKit
}:

with lib;
Expand All @@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
++ optional (!withGtk2) gtk3
++ optional withMesa libGLU
++ optional withWebKit webkitgtk
++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ];
++ optionals stdenv.isDarwin [ setfile AVFoundation Carbon Cocoa Kernel QTKit ];

propagatedBuildInputs = optional stdenv.isDarwin AGL;

Expand Down Expand Up @@ -90,6 +90,5 @@ stdenv.mkDerivation rec {
homepage = "https://www.wxwidgets.org/";
description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base";
longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more.";
badPlatforms = [ "x86_64-darwin" ];
};
}
5 changes: 3 additions & 2 deletions pkgs/development/libraries/wxwidgets/3.1/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
, withWebKit ? false
, webkitgtk ? null
, AGL ? null
, AVFoundation ? null
, Carbon ? null
, Cocoa ? null
, Kernel ? null
Expand Down Expand Up @@ -59,8 +60,8 @@ stdenv.mkDerivation rec {
] ++ optionals withGtk2 [ gtk2 GConf ]
++ optional (!withGtk2) gtk3
++ optional withMesa libGLU
++ optional withWebKit webkitgtk
++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ];
++ optional (withWebKit && !stdenv.isDarwin) webkitgtk # Disable webkitgtk on darwin pending #126101
++ optionals stdenv.isDarwin [ setfile AVFoundation Carbon Cocoa Kernel QTKit ];

nativeBuildInputs = [ pkg-config ];

Expand Down
8 changes: 4 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20232,25 +20232,25 @@ with pkgs;
wxGTK30-gtk2 = callPackage ../development/libraries/wxwidgets/3.0 {
withGtk2 = true;
inherit (darwin.stubs) setfile;
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit;
inherit (darwin.apple_sdk.frameworks) AGL AVFoundation Carbon Cocoa Kernel QTKit;
};

wxGTK30-gtk3 = callPackage ../development/libraries/wxwidgets/3.0 {
withGtk2 = false;
inherit (darwin.stubs) setfile;
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit;
inherit (darwin.apple_sdk.frameworks) AGL AVFoundation Carbon Cocoa Kernel QTKit;
};

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

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

wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix {
Expand Down