about summary refs log tree commit diff
path: root/pkgs/development/python-modules/wxPython
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2015-11-20 08:34:24 +0100
committerDomen Kožar <domen@dev.si>2015-11-21 21:44:12 +0100
commit99a64da6001f5e4fec363b6a98afccda61b6d68f (patch)
tree8fb1f1e8fa62c805aeae03de917efa24d3445fff /pkgs/development/python-modules/wxPython
parent64b5e1ce923a4c78cbd96e2f720e37e5aca9dfdb (diff)
downloadnixlib-99a64da6001f5e4fec363b6a98afccda61b6d68f.tar
nixlib-99a64da6001f5e4fec363b6a98afccda61b6d68f.tar.gz
nixlib-99a64da6001f5e4fec363b6a98afccda61b6d68f.tar.bz2
nixlib-99a64da6001f5e4fec363b6a98afccda61b6d68f.tar.lz
nixlib-99a64da6001f5e4fec363b6a98afccda61b6d68f.tar.xz
nixlib-99a64da6001f5e4fec363b6a98afccda61b6d68f.tar.zst
nixlib-99a64da6001f5e4fec363b6a98afccda61b6d68f.zip
fix wxPython
Diffstat (limited to 'pkgs/development/python-modules/wxPython')
-rw-r--r--pkgs/development/python-modules/wxPython/2.8.nix3
-rw-r--r--pkgs/development/python-modules/wxPython/generic.nix21
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; };