From 99a64da6001f5e4fec363b6a98afccda61b6d68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 20 Nov 2015 08:34:24 +0100 Subject: [PATCH] fix wxPython --- .../python-modules/wxPython/2.8.nix | 3 --- .../python-modules/wxPython/generic.nix | 21 ++++++++----------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/wxPython/2.8.nix b/pkgs/development/python-modules/wxPython/2.8.nix index 4a464e572b80..f0a452424158 100644 --- a/pkgs/development/python-modules/wxPython/2.8.nix +++ b/pkgs/development/python-modules/wxPython/2.8.nix @@ -1,9 +1,6 @@ { callPackage, ... } @ args: callPackage ./generic.nix (args // rec { - version = "2.8.12.1"; - sha256 = "1l1w4i113csv3bd5r8ybyj0qpxdq83lj6jrc5p7cc10mkwyiagqz"; - }) diff --git a/pkgs/development/python-modules/wxPython/generic.nix b/pkgs/development/python-modules/wxPython/generic.nix index 8990f5cf4d1b..3151dbcfac3d 100644 --- a/pkgs/development/python-modules/wxPython/generic.nix +++ b/pkgs/development/python-modules/wxPython/generic.nix @@ -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; };