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
138 changes: 0 additions & 138 deletions pkgs/development/libraries/wxwidgets/3.1/default.nix

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ stdenv.mkDerivation rec {

patches = [
# https://github.com/wxWidgets/wxWidgets/issues/17942
../0001-fix-assertion-using-hide-in-destroy.patch
./0001-fix-assertion-using-hide-in-destroy.patch
];

nativeBuildInputs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
, pkg-config
, xorgproto
, withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
, compat24 ? false
, compat26 ? true
, compat26 ? false
, compat28 ? true
, unicode ? true
, withGtk2 ? true
, withWebKit ? false, webkitgtk
Expand Down Expand Up @@ -66,14 +66,14 @@ stdenv.mkDerivation rec {

patches = [
# https://github.com/wxWidgets/wxWidgets/issues/17942
../0001-fix-assertion-using-hide-in-destroy.patch
./0001-fix-assertion-using-hide-in-destroy.patch
];

configureFlags = [
"--disable-precomp-headers"
"--enable-mediactrl"
(if compat24 then "--enable-compat24" else "--disable-compat24")
(if compat26 then "--enable-compat26" else "--disable-compat26")
(if compat28 then "--enable-compat28" else "--disable-compat28")
]
++ lib.optional unicode "--enable-unicode"
++ lib.optional withMesa "--with-opengl"
Expand Down Expand Up @@ -133,6 +133,6 @@ stdenv.mkDerivation rec {

passthru = {
inherit gtk;
inherit compat24 compat26 unicode;
inherit compat26 compat28 unicode;
};
}
149 changes: 149 additions & 0 deletions pkgs/development/libraries/wxwidgets/wxGTK31.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchurl
, gnome2
, gst_all_1
, gtk2
, gtk3
, libGL
, libGLU
, libSM
, libXinerama
, libXtst
, libXxf86vm
, pkg-config
, xorgproto
, compat28 ? false
, compat30 ? true
, unicode ? true
, withGtk2 ? true
, withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
, withWebKit ? false, webkitgtk
, darwin
}:

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

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;
in
stdenv.mkDerivation rec {
pname = "wxwidgets";
version = "3.1.5";

src = fetchFromGitHub {
owner = "wxWidgets";
repo = "wxWidgets";
rev = "v${version}";
hash = "sha256-2zMvcva0GUDmSYK0Wk3/2Y6R3F7MgdqGBrOhmWgVA6g=";
fetchSubmodules = true;
};

patches = [
# https://github.com/wxWidgets/wxWidgets/issues/17942
./0001-fix-assertion-using-hide-in-destroy.patch
];

nativeBuildInputs = [ pkg-config ];

buildInputs = [
gst-plugins-base
gstreamer
gtk
libSM
libXinerama
libXtst
libXxf86vm
xorgproto
]
++ lib.optionals withGtk2 [
GConf
]
++ lib.optional withMesa libGLU
++ lib.optional withWebKit webkitgtk
++ lib.optionals stdenv.isDarwin [
Carbon
Cocoa
Kernel
QTKit
setfile
];

propagatedBuildInputs = lib.optional stdenv.isDarwin AGL;

configureFlags = [
"--disable-precomp-headers"
"--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"
]
++ lib.optionals withWebKit [
"--enable-webview"
"--enable-webviewwebkit"
];

SEARCH_LIB = "${libGLU.out}/lib ${libGL.out}/lib ";

preConfigure = ''
substituteInPlace configure --replace \
'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
substituteInPlace configure --replace \
'SEARCH_LIB=' 'DUMMY_SEARCH_LIB='
substituteInPlace configure --replace \
/usr /no-such-path
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace configure --replace \
'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
substituteInPlace configure --replace \
"-framework System" "-lSystem"
'';

postInstall = "
pushd $out/include
ln -s wx-*/* .
popd
";

enableParallelBuilding = true;

meta = with lib; {
homepage = "https://www.wxwidgets.org/";
description = "A Cross-Platform C++ GUI Library";
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.
'';
license = licenses.wxWindows;
maintainers = with maintainers; [ AndersonTorres tfmoraes ];
platforms = platforms.unix;
badPlatforms = platforms.darwin; # ofBorg is failing, don't know if internal
};

passthru = {
inherit gtk;
inherit compat28 compat30 unicode;
};
}
35 changes: 9 additions & 26 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20544,34 +20544,17 @@ with pkgs;

wxGTK = wxGTK28;

wxGTK30 = wxGTK30-gtk2;
wxGTK31 = wxGTK31-gtk2;
wxGTK28 = callPackage ../development/libraries/wxwidgets/wxGTK28.nix { };
wxGTK29 = callPackage ../development/libraries/wxwidgets/wxGTK29.nix { };
wxGTK30 = callPackage ../development/libraries/wxwidgets/wxGTK30.nix { };
wxGTK31 = callPackage ../development/libraries/wxwidgets/wxGTK31.nix { };
wxmac = callPackage ../development/libraries/wxwidgets/wxmac30.nix { };

wxGTK28 = callPackage ../development/libraries/wxwidgets/2.8 { };
wxGTK30-gtk2 = wxGTK30.override { withGtk2 = true; };
wxGTK30-gtk3 = wxGTK30.override { withGtk2 = false; };

wxGTK29 = callPackage ../development/libraries/wxwidgets/2.9 { };

wxGTK30-gtk2 = callPackage ../development/libraries/wxwidgets/3.0 {
withGtk2 = true;
};

wxGTK30-gtk3 = callPackage ../development/libraries/wxwidgets/3.0 {
withGtk2 = false;
};

wxGTK31-gtk2 = callPackage ../development/libraries/wxwidgets/3.1 {
withGtk2 = true;
inherit (darwin.stubs) setfile;
inherit (darwin.apple_sdk.frameworks) AGL 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;
};

wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix { };
wxGTK31-gtk2 = wxGTK30.override { withGtk2 = true; };
wxGTK31-gtk3 = wxGTK30.override { withGtk2 = false; };
Comment on lines +20556 to +20557
Copy link
Contributor

@KoviRobi KoviRobi Feb 23, 2022

Choose a reason for hiding this comment

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

Is this a typo that's meant to be wxGTK31.override? (I can open a separate MR, just trying to get kicad working)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, I left that escape :/


wxSVG = callPackage ../development/libraries/wxSVG {
wxGTK = wxGTK30-gtk3;
Expand Down