wxPython: refactor to generic
This commit is contained in:
34
pkgs/development/python-modules/wxPython/generic.nix
Normal file
34
pkgs/development/python-modules/wxPython/generic.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ stdenv, fetchurl, pkgconfig, python, buildPythonPackage, isPy3k, isPyPy, wxGTK, openglSupport ? true, pyopengl
|
||||
, version, sha256, ...
|
||||
}:
|
||||
|
||||
assert wxGTK.unicode;
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
||||
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;
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
inherit openglSupport;
|
||||
|
||||
passthru = { inherit wxGTK openglSupport; };
|
||||
}
|
||||
Reference in New Issue
Block a user