summaryrefslogtreecommitdiffstats
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2016-05-27 21:25:48 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2016-05-27 21:25:48 +0200
commit9597ca718b1612f0a1f0ec0c00b02b55f7a3775e (patch)
treeb3f5bfbd331a0926ab54eb3a5b9e408f56217c01 /pkgs/development/python-modules
parent63b73234029df4e31d9a4c0788ce59847422e0eb (diff)
pythonPackages.wxPython{28,30} : use buildPythonPackage
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/wxPython/2.8.nix41
-rw-r--r--pkgs/development/python-modules/wxPython/3.0.nix38
-rw-r--r--pkgs/development/python-modules/wxPython/generic.nix31
3 files changed, 71 insertions, 39 deletions
diff --git a/pkgs/development/python-modules/wxPython/2.8.nix b/pkgs/development/python-modules/wxPython/2.8.nix
index f0a452424158..12027f54ff82 100644
--- a/pkgs/development/python-modules/wxPython/2.8.nix
+++ b/pkgs/development/python-modules/wxPython/2.8.nix
@@ -1,6 +1,39 @@
-{ callPackage, ... } @ args:
+{ fetchurl
+, lib
+, pythonPackages
+, openglSupport ? true
+, libX11
+, wxGTK
+, pkgconfig
+}:
-callPackage ./generic.nix (args // rec {
+assert wxGTK.unicode;
+
+with pythonPackages;
+
+buildPythonPackage rec {
+ name = "wxPython-${version}";
version = "2.8.12.1";
- sha256 = "1l1w4i113csv3bd5r8ybyj0qpxdq83lj6jrc5p7cc10mkwyiagqz";
-})
+
+ disabled = isPy3k || isPyPy;
+ doCheck = false;
+
+ src = fetchurl {
+ url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
+ sha256 = "1l1w4i113csv3bd5r8ybyj0qpxdq83lj6jrc5p7cc10mkwyiagqz";
+ };
+
+ propagatedBuildInputs = [ pkgconfig wxGTK (wxGTK.gtk) libX11 ] ++ lib.optional openglSupport pyopengl;
+ preConfigure = "cd wxPython";
+
+ NIX_LDFLAGS = "-lX11 -lgdk-x11-2.0";
+
+ buildPhase = "";
+
+ installPhase = ''
+ ${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; };
+}
diff --git a/pkgs/development/python-modules/wxPython/3.0.nix b/pkgs/development/python-modules/wxPython/3.0.nix
index 6892d7e87298..7c225a95f2a6 100644
--- a/pkgs/development/python-modules/wxPython/3.0.nix
+++ b/pkgs/development/python-modules/wxPython/3.0.nix
@@ -1,9 +1,39 @@
-{ callPackage, ... } @ args:
+{ fetchurl
+, lib
+, pythonPackages
+, openglSupport ? true
+, libX11
+, wxGTK
+, pkgconfig
+}:
-callPackage ./generic.nix (args // rec {
+assert wxGTK.unicode;
+with pythonPackages;
+
+buildPythonPackage rec {
+ name = "wxPython-${version}";
version = "3.0.2.0";
- sha256 = "0qfzx3sqx4mwxv99sfybhsij4b5pc03ricl73h4vhkzazgjjjhfm";
+ disabled = isPy3k || isPyPy;
+ doCheck = false;
+
+ src = fetchurl {
+ url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
+ sha256 = "0qfzx3sqx4mwxv99sfybhsij4b5pc03ricl73h4vhkzazgjjjhfm";
+ };
+
+ propagatedBuildInputs = [ pkgconfig wxGTK (wxGTK.gtk) libX11 ] ++ lib.optional openglSupport pyopengl;
+ preConfigure = "cd wxPython";
+
+ NIX_LDFLAGS = "-lX11 -lgdk-x11-2.0";
+
+ buildPhase = "";
+
+ installPhase = ''
+ ${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; };
+}
diff --git a/pkgs/development/python-modules/wxPython/generic.nix b/pkgs/development/python-modules/wxPython/generic.nix
deleted file mode 100644
index 16c7c1263187..000000000000
--- a/pkgs/development/python-modules/wxPython/generic.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, python, isPy3k, isPyPy, wxGTK, openglSupport ? true, pyopengl
-, version, sha256, wrapPython, setuptools, libX11, ...
-}:
-
-assert wxGTK.unicode;
-
-stdenv.mkDerivation rec {
- name = "wxPython-${version}";
- inherit version;
-
- disabled = isPy3k || isPyPy;
- doCheck = false;
-
- src = fetchurl {
- url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
- inherit sha256;
- };
-
- pythonPath = [ python setuptools ];
- buildInputs = [ python setuptools pkgconfig wxGTK (wxGTK.gtk) wrapPython libX11 ] ++ stdenv.lib.optional openglSupport pyopengl;
- preConfigure = "cd wxPython";
-
- NIX_LDFLAGS = "-lX11 -lgdk-x11-2.0";
-
- installPhase = ''
- ${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; };
-}