nixpkgs/pkgs/development/libraries/wxwidgets/wxGTK30.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

147 lines
3.6 KiB
Nix
Raw Normal View History

2022-02-01 03:25:51 +00:00
{ lib
, stdenv
2022-10-12 14:33:16 +00:00
, expat
2022-02-01 03:25:51 +00:00
, fetchFromGitHub
, gst_all_1
, gtk3
, libGL
, libGLU
, libSM
, libXinerama
, libXxf86vm
2022-10-12 14:33:16 +00:00
, libpng
, libtiff
, libjpeg_turbo
, zlib
2022-02-01 03:25:51 +00:00
, pkg-config
, xorgproto
2022-02-04 02:31:16 +00:00
, compat26 ? false
, compat28 ? true
2022-02-01 03:25:51 +00:00
, unicode ? true
2022-10-12 14:33:16 +00:00
, withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
, withWebKit ? false
, webkitgtk
, setfile
2022-02-21 22:29:36 +00:00
, AGL
, Carbon
, Cocoa
, Kernel
, QTKit
2022-10-12 14:33:16 +00:00
, AVFoundation
, AVKit
, WebKit
2013-12-30 16:03:23 +00:00
}:
2018-07-29 20:01:45 +00:00
stdenv.mkDerivation rec {
pname = "wxwidgets";
2022-11-15 07:21:46 +00:00
version = "3.0.5.1";
2013-12-30 16:03:23 +00:00
2017-05-27 12:39:42 +00:00
src = fetchFromGitHub {
owner = "wxWidgets";
repo = "wxWidgets";
rev = "v${version}";
2022-11-15 07:21:46 +00:00
hash = "sha256-I91douzXDAfDgm4Pplf17iepv4vIRhXZDRFl9keJJq0=";
2013-12-30 16:03:23 +00:00
};
2022-10-12 14:33:16 +00:00
nativeBuildInputs = [ pkg-config ];
buildInputs = [
2022-02-21 22:30:03 +00:00
gst_all_1.gst-plugins-base
2022-10-12 14:33:16 +00:00
gst_all_1.gstreamer
libpng
libtiff
libjpeg_turbo
zlib
] ++ lib.optionals stdenv.isLinux [
2022-12-03 02:28:32 +00:00
gtk3
2022-02-01 03:25:51 +00:00
libSM
libXinerama
libXxf86vm
xorgproto
]
++ lib.optional withMesa libGLU
2022-10-12 14:33:16 +00:00
++ lib.optional (withWebKit && stdenv.isLinux) webkitgtk
++ lib.optional (withWebKit && stdenv.isDarwin) WebKit
2022-02-01 03:25:51 +00:00
++ lib.optionals stdenv.isDarwin [
2022-10-12 14:33:16 +00:00
expat
setfile
2022-02-01 03:25:51 +00:00
Carbon
Cocoa
Kernel
QTKit
2022-10-12 14:33:16 +00:00
AVFoundation
AVKit
2022-02-01 03:25:51 +00:00
];
2013-12-30 16:03:23 +00:00
2022-02-01 03:25:51 +00:00
propagatedBuildInputs = lib.optional stdenv.isDarwin AGL;
2016-12-31 02:03:51 +00:00
patches = [
2022-02-01 03:25:51 +00:00
# https://github.com/wxWidgets/wxWidgets/issues/17942
2022-02-27 01:39:56 +00:00
./patches/0001-fix-assertion-using-hide-in-destroy.patch
2018-07-29 20:01:45 +00:00
];
2017-01-18 19:42:53 +00:00
2022-02-01 03:25:51 +00:00
configureFlags = [
"--disable-precomp-headers"
"--enable-mediactrl"
(if compat26 then "--enable-compat26" else "--disable-compat26")
2022-02-04 02:31:16 +00:00
(if compat28 then "--enable-compat28" else "--disable-compat28")
2022-10-12 14:33:16 +00:00
] ++ lib.optional unicode "--enable-unicode"
2022-02-01 03:25:51 +00:00
++ lib.optional withMesa "--with-opengl"
2022-10-12 14:33:16 +00:00
++ lib.optionals stdenv.isDarwin [
# allow building on 64-bit
2022-02-01 03:25:51 +00:00
"--enable-universal-binaries"
"--with-macosx-version-min=10.7"
2022-10-12 14:33:16 +00:00
"--with-osx_cocoa"
"--with-libiconv"
] ++ lib.optionals withWebKit [
2022-02-01 03:25:51 +00:00
"--enable-webview"
2022-10-12 14:33:16 +00:00
"--enable-webviewwebkit"
2022-02-01 03:25:51 +00:00
];
2013-12-30 16:03:23 +00:00
2022-10-12 14:33:16 +00:00
SEARCH_LIB = "${libGLU.out}/lib ${libGL.out}/lib";
2013-12-30 16:03:23 +00:00
2022-02-01 03:25:51 +00:00
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 ''
2022-10-12 14:33:16 +00:00
substituteInPlace configure \
--replace 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
substituteInPlace configure \
--replace "-framework System" "-lSystem"
2013-12-30 16:03:23 +00:00
'';
2022-02-01 03:25:51 +00:00
postInstall = ''
pushd $out/include
ln -s wx-*/* .
popd
'';
2013-12-30 16:03:23 +00:00
enableParallelBuilding = true;
2018-07-29 20:01:45 +00:00
2022-02-01 03:25:51 +00:00
meta = with lib; {
homepage = "https://www.wxwidgets.org/";
2022-02-01 03:25:51 +00:00
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;
2022-10-12 14:33:16 +00:00
maintainers = with maintainers; [ wegank ];
platforms = platforms.unix;
};
2022-02-01 03:25:51 +00:00
passthru = {
2022-02-04 02:31:16 +00:00
inherit compat26 compat28 unicode;
2022-02-01 03:25:51 +00:00
};
2013-12-30 16:03:23 +00:00
}