diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2015-09-02 19:40:38 +0200 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2015-09-05 11:11:19 +0200 |
commit | 9a0f8b5a4f27623c81ef87499d6aea541f831079 (patch) | |
tree | 3377849a31ddb76bc78659315d26634f34689d44 /pkgs/development/python-modules/wxPython | |
parent | eb42c82f6b27fa9b5545479a58f7a1d597dff244 (diff) | |
download | nixlib-9a0f8b5a4f27623c81ef87499d6aea541f831079.tar nixlib-9a0f8b5a4f27623c81ef87499d6aea541f831079.tar.gz nixlib-9a0f8b5a4f27623c81ef87499d6aea541f831079.tar.bz2 nixlib-9a0f8b5a4f27623c81ef87499d6aea541f831079.tar.lz nixlib-9a0f8b5a4f27623c81ef87499d6aea541f831079.tar.xz nixlib-9a0f8b5a4f27623c81ef87499d6aea541f831079.tar.zst nixlib-9a0f8b5a4f27623c81ef87499d6aea541f831079.zip |
wxPython-3: refactor
Diffstat (limited to 'pkgs/development/python-modules/wxPython')
-rw-r--r-- | pkgs/development/python-modules/wxPython/3.0.nix | 31 | ||||
-rw-r--r-- | pkgs/development/python-modules/wxPython/builder3.0.sh | 22 |
2 files changed, 17 insertions, 36 deletions
diff --git a/pkgs/development/python-modules/wxPython/3.0.nix b/pkgs/development/python-modules/wxPython/3.0.nix index 2ef62b87cc5a..7cb05c59db6b 100644 --- a/pkgs/development/python-modules/wxPython/3.0.nix +++ b/pkgs/development/python-modules/wxPython/3.0.nix @@ -1,29 +1,32 @@ -{ stdenv, fetchurl, pkgconfig, wxGTK, pythonPackages, openglSupport ? true, python, isPyPy }: +{ stdenv, fetchurl, pkgconfig, python, buildPythonPackage, isPy3k, isPyPy, wxGTK, openglSupport ? true, pyopengl }: assert wxGTK.unicode; -with stdenv.lib; +buildPythonPackage rec { -let version = "3.0.2.0"; in + disabled = isPy3k || isPyPy; + doCheck = false; -if isPyPy then throw "wxPython-${version} not supported for interpreter ${python.executable}" else stdenv.mkDerivation { + version = "3.0.2.0"; name = "wxPython-${version}"; - - builder = ./builder3.0.sh; - + src = fetchurl { url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2"; sha256 = "0qfzx3sqx4mwxv99sfybhsij4b5pc03ricl73h4vhkzazgjjjhfm"; }; - - buildInputs = [ pkgconfig wxGTK (wxGTK.gtk) pythonPackages.python pythonPackages.wrapPython ] - ++ optional openglSupport pythonPackages.pyopengl; + + 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; }; - - meta = { - platforms = stdenv.lib.platforms.all; - }; } diff --git a/pkgs/development/python-modules/wxPython/builder3.0.sh b/pkgs/development/python-modules/wxPython/builder3.0.sh deleted file mode 100644 index 7403c67d0912..000000000000 --- a/pkgs/development/python-modules/wxPython/builder3.0.sh +++ /dev/null @@ -1,22 +0,0 @@ -source $stdenv/setup - -flags="WXPORT=gtk2 NO_HEADERS=1 BUILD_GLCANVAS=${openglSupport?1:0} UNICODE=1" - -configurePhase() { - cd wxPython -} - -buildPhase() { - python setup.py $flags build -} - -installPhase() { - python setup.py $flags install --prefix=$out - - # Ugly workaround for Nixpkgs/111. - ln -s $out/lib/python*/site-packages/wx-*-gtk2-unicode/* $out/lib/python*/site-packages - - wrapPythonPrograms -} - -genericBuild |