Merge pull request #157410 from AndersonTorres/new-wx

wxmac: rewrite
This commit is contained in:
Anderson Torres 2022-01-30 15:21:06 -03:00 committed by GitHub
commit 862ab45611
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 39 deletions

View file

@ -1,71 +1,99 @@
{ lib, stdenv, fetchFromGitHub, expat, libiconv, libjpeg, libpng, libtiff, zlib
# darwin only attributes
, derez, rez, setfile
, AGL, Cocoa, Kernel, WebKit
{ lib
, stdenv
, fetchFromGitHub
, expat
, libiconv
, libjpeg
, libpng
, libtiff
, zlib
, darwin
}:
let
inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel WebKit;
inherit (darwin.stubs) derez rez setfile;
in
stdenv.mkDerivation rec {
version = "3.0.5.1";
pname = "wxmac";
version = "3.0.5.1";
src = fetchFromGitHub {
owner = "wxWidgets";
repo = "wxWidgets";
rev = "v${version}";
sha256 = "sha256-I91douzXDAfDgm4Pplf17iepv4vIRhXZDRFl9keJJq0=";
hash = "sha256-I91douzXDAfDgm4Pplf17iepv4vIRhXZDRFl9keJJq0=";
};
buildInputs = [
expat libiconv libjpeg libpng libtiff zlib
derez rez setfile
AGL Cocoa Kernel WebKit
expat
libiconv
libjpeg
libpng
libtiff
zlib
AGL
Cocoa
Kernel
WebKit
derez
rez
setfile
];
postPatch = ''
substituteInPlace configure --replace "-framework System" -lSystem
substituteInPlace configure --replace "-framework System" "-lSystem"
'';
configureFlags = [
"wx_cv_std_libfullpath=/var/empty"
"--with-macosx-version-min=10.7"
"--enable-unicode"
"--with-osx_cocoa"
"--enable-std_string"
"--enable-display"
"--with-opengl"
"--with-libjpeg"
"--with-libtiff"
"--without-liblzma"
"--with-libpng"
"--with-zlib"
"--enable-dnd"
"--disable-mediactrl"
"--disable-precomp-headers"
"--enable-clipboard"
"--enable-webkit"
"--enable-svg"
"--enable-graphics_ctx"
"--enable-controls"
"--enable-dataviewctrl"
"--enable-display"
"--enable-dnd"
"--enable-graphics_ctx"
"--enable-std_string"
"--enable-svg"
"--enable-unicode"
"--enable-webkit"
"--with-expat"
"--disable-precomp-headers"
"--disable-mediactrl"
"--with-libjpeg"
"--with-libpng"
"--with-libtiff"
"--with-macosx-version-min=10.7"
"--with-opengl"
"--with-osx_cocoa"
"--with-zlib"
"--without-liblzma"
"wx_cv_std_libfullpath=/var/empty"
];
doCheck = true;
checkPhase = ''
./wx-config --libs
'';
NIX_CFLAGS_COMPILE = "-Wno-undef";
doCheck = true;
enableParallelBuilding = true;
meta = with lib; {
platforms = platforms.darwin;
license = licenses.wxWindows;
maintainers = [ maintainers.lnl7 ];
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.";
description = "A Cross-Platform C++ GUI Library - MacOS-only build";
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; [ lnl7 ];
platforms = platforms.darwin;
};
}

View file

@ -20467,10 +20467,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit;
};
wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix {
inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel WebKit;
inherit (darwin.stubs) setfile rez derez;
};
wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix { };
wxSVG = callPackage ../development/libraries/wxSVG {
wxGTK = wxGTK30-gtk3;