Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 660ae96644c5
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dd72edcdae1e
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Nov 10, 2020

  1. pwsafe: use wxGTK30

    tfmoraes authored and Jonathan Ringer committed Nov 10, 2020
    Copy the full SHA
    72bb100 View commit details
  2. wxGTK31: 3.1.3 -> 3.1.4

    tfmoraes authored and Jonathan Ringer committed Nov 10, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2a136d1 View commit details
  3. python3Packages.wxpython_4_1: init at 4.1.0

    tfmoraes authored and Jonathan Ringer committed Nov 10, 2020
    Copy the full SHA
    dd72edc View commit details
4 changes: 2 additions & 2 deletions pkgs/applications/misc/pwsafe/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, zip, gettext, perl
, wxGTK31, libXext, libXi, libXt, libXtst, xercesc
, wxGTK30, libXext, libXi, libXt, libXtst, xercesc
, qrencode, libuuid, libyubikey, yubikey-personalization
, curl, openssl, file
}:
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
cmake gettext perl pkgconfig zip
];
buildInputs = [
libXext libXi libXt libXtst wxGTK31
libXext libXi libXt libXtst wxGTK30
curl qrencode libuuid openssl xercesc
libyubikey yubikey-personalization
file
87 changes: 64 additions & 23 deletions pkgs/development/libraries/wxwidgets/3.1/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
{ stdenv, fetchFromGitHub, fetchurl, pkgconfig
, libXinerama, libSM, libXxf86vm
, gtk2, gtk3
, xorgproto, gst_all_1, setfile
{ stdenv
, fetchFromGitHub
, fetchurl
, pkgconfig
, libXinerama
, libSM
, libXxf86vm
, libXtst
, gtk2
, GConf ? null
, gtk3
, xorgproto
, gst_all_1
, setfile
, libGLSupported ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms
, withMesa ? libGLSupported, libGLU ? null, libGL ? null
, compat28 ? false, compat30 ? true, unicode ? true
, withMesa ? libGLSupported
, libGLU ? null
, libGL ? null
, compat28 ? false
, compat30 ? true
, unicode ? true
, withGtk2 ? true
, withWebKit ? false, webkitgtk ? null
, AGL ? null, Carbon ? null, Cocoa ? null, Kernel ? null, QTKit ? null
, withWebKit ? false
, webkitgtk ? null
, AGL ? null
, Carbon ? null
, Cocoa ? null
, Kernel ? null
, QTKit ? null
}:

with stdenv.lib;
@@ -18,47 +37,58 @@ assert withWebKit -> webkitgtk != null;
assert assertMsg (withGtk2 -> withWebKit == false) "wxGTK31: You cannot enable withWebKit when using withGtk2.";

stdenv.mkDerivation rec {
version = "3.1.3";
version = "3.1.4";
pname = "wxwidgets";

src = fetchFromGitHub {
owner = "wxWidgets";
repo = "wxWidgets";
rev = "v${version}";
sha256 = "022mby78q7n0bhd4mph04hz93c9qamnvzv3h1s26r839k28760f4";
sha256 = "1fwzrk6w5k0vs8kqdq5lpzdbp5c09hx740wg6mi6vgmc1r67dv67";
fetchSubmodules = true;
};

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

nativeBuildInputs = [ pkgconfig ];

propagatedBuildInputs = optional stdenv.isDarwin AGL;

patches = [
(fetchurl { # https://trac.wxwidgets.org/ticket/17942
(fetchurl {
# https://trac.wxwidgets.org/ticket/17942
url = "https://trac.wxwidgets.org/raw-attachment/ticket/17942/"
+ "fix_assertion_using_hide_in_destroy.diff";
+ "fix_assertion_using_hide_in_destroy.diff";
sha256 = "009y3dav79wiig789vkkc07g1qdqprg1544lih79199kb1h64lvy";
})
];

configureFlags =
[ "--disable-precomp-headers" "--enable-mediactrl"
[
"--disable-precomp-headers"
"--enable-mediactrl"
(if compat28 then "--enable-compat28" else "--disable-compat28")
(if compat30 then "--enable-compat30" else "--disable-compat30") ]
(if compat30 then "--enable-compat30" else "--disable-compat30")
]
++ optional unicode "--enable-unicode"
++ optional withMesa "--with-opengl"
++ optionals stdenv.isDarwin
# allow building on 64-bit
[ "--with-cocoa" "--enable-universal-binaries" "--with-macosx-version-min=10.7" ]
++ optionals withWebKit
["--enable-webview" "--enable-webviewwebkit"];
[ "--enable-webview" "--enable-webviewwebkit" ];

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

@@ -90,8 +120,19 @@ stdenv.mkDerivation rec {
platforms = with platforms; darwin ++ linux;
license = licenses.wxWindows;
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 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" ];
maintainers = with maintainers; [ tfmoraes ];
};
}
75 changes: 75 additions & 0 deletions pkgs/development/python-modules/wxPython/4.1.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{ lib
, stdenv
, fetchPypi
, buildPythonPackage
, which
, pkgconfig
, python
, isPy27
, pyopengl
, doxygen
, cairo
, ncurses
, pango
, wxGTK
}:
let
dynamic-linker = stdenv.cc.bintools.dynamicLinker;
in
buildPythonPackage rec {
pname = "wxPython";
version = "4.1.0";
disabled = isPy27;

src = fetchPypi {
inherit pname version;
sha256 = "12x4ci5q7qni4rkfiq6lnpn1fk8b0sfc6dck5wyxkj2sfp5pa91f";
};

# https://github.com/NixOS/nixpkgs/issues/75759
# https://github.com/wxWidgets/Phoenix/issues/1316
doCheck = false;

nativeBuildInputs = [ which doxygen wxGTK pkgconfig ];

buildInputs = [
wxGTK.gtk
ncurses
];

DOXYGEN = "${doxygen}/bin/doxygen";

preConfigure = lib.optionalString (!stdenv.isDarwin) ''
substituteInPlace wx/lib/wxcairo/wx_pycairo.py \
--replace 'cairoLib = None' 'cairoLib = ctypes.CDLL("${cairo}/lib/libcairo.so")'
substituteInPlace wx/lib/wxcairo/wx_pycairo.py \
--replace '_dlls = dict()' '_dlls = {k: ctypes.CDLL(v) for k, v in [
("gdk", "${wxGTK.gtk}/lib/libgtk-x11-3.0.so"),
("pangocairo", "${pango.out}/lib/libpangocairo-1.0.so"),
("appsvc", None)
]}'
# https://github.com/wxWidgets/Phoenix/pull/1584
# It'll be not needed in next version because https://github.com/wxWidgets/Phoenix/pull/1699
substituteInPlace build.py --replace "os.environ['PYTHONPATH'] = phoenixDir()" \
"os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] + os.pathsep + phoenixDir()"
'';

buildPhase = ''
${python.interpreter} build.py -v --use_syswx dox etg --nodoc build_py
'';

installPhase = ''
${python.interpreter} setup.py install --skip-build --prefix=$out
wrapPythonPrograms
'';

passthru = { inherit wxGTK; };

meta = with lib; {
description = "Cross platform GUI toolkit for Python, Phoenix version";
homepage = "http://wxpython.org/";
license = licenses.wxWindows;
maintainers = with maintainers; [ tfmoraes ];
};
}
8 changes: 8 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -7689,6 +7689,14 @@ in {
};
};

wxPython_4_1 = callPackage ../development/python-modules/wxPython/4.1.nix {
inherit (pkgs) pkgconfig;
wxGTK = pkgs.wxGTK31.override {
withGtk2 = false;
withWebKit = true;
};
};

wxPython = self.wxPython30;

x11_hash = callPackage ../development/python-modules/x11_hash { };