fix wxPython

This commit is contained in:
Domen Kožar 2015-11-20 08:34:24 +01:00
parent 64b5e1ce92
commit 99a64da600
2 changed files with 9 additions and 15 deletions

View File

@ -1,9 +1,6 @@
{ callPackage, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "2.8.12.1";
sha256 = "1l1w4i113csv3bd5r8ybyj0qpxdq83lj6jrc5p7cc10mkwyiagqz";
})

View File

@ -1,31 +1,28 @@
{ stdenv, fetchurl, pkgconfig, python, buildPythonPackage, isPy3k, isPyPy, wxGTK, openglSupport ? true, pyopengl
, version, sha256, ...
{ stdenv, fetchurl, pkgconfig, python, isPy3k, isPyPy, wxGTK, openglSupport ? true, pyopengl
, version, sha256, wrapPython, setuptools, ...
}:
assert wxGTK.unicode;
buildPythonPackage rec {
stdenv.mkDerivation rec {
name = "wxPython-${version}";
inherit version;
disabled = isPy3k || isPyPy;
doCheck = false;
name = "wxPython-${version}";
inherit version;
src = fetchurl {
url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
inherit sha256;
};
buildInputs = [ pkgconfig wxGTK (wxGTK.gtk) ]
++ stdenv.lib.optional openglSupport pyopengl;
pythonPath = [ python setuptools ];
buildInputs = [ python setuptools pkgconfig wxGTK (wxGTK.gtk) wrapPython ] ++ stdenv.lib.optional openglSupport pyopengl;
preConfigure = "cd wxPython";
setupPyBuildFlags = [ "WXPORT=gtk2" "NO_HEADERS=1" "BUILD_GLCANVAS=${if openglSupport then "1" else "0"}" "UNICODE=1" ];
installPhase = ''
${python}/bin/${python.executable} setup.py ${stdenv.lib.concatStringsSep " " setupPyBuildFlags} install --prefix=$out
${python.interpreter} setup.py install WXPORT=gtk2 NO_HEADERS=1 BUILD_GLCANVAS=${if openglSupport then "1" else "0"} UNICODE=1 --prefix=$out
wrapPythonPrograms
'';
passthru = { inherit wxGTK openglSupport; };