summary refs log tree commit diff
path: root/pkgs/development/python-modules/wxPython
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-06-10 09:27:04 +0000
committerRobin Gloster <mail@glob.in>2016-06-10 09:27:04 +0000
commit8031cba2ab3146977141fc504bea2a1e03b5c126 (patch)
tree0cd68c0007851dfed7d7f8247754b5c4b356704e /pkgs/development/python-modules/wxPython
parent2a5e64b69c83592caf900cb0b7213235e96368de (diff)
parent656c48f141be5886c515a1a874a47472cbbac6bd (diff)
downloadnixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.gz
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.bz2
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.lz
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.xz
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.zst
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.zip
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/development/python-modules/wxPython')
-rw-r--r--pkgs/development/python-modules/wxPython/2.8.nix6
-rw-r--r--pkgs/development/python-modules/wxPython/3.0.nix38
-rw-r--r--pkgs/development/python-modules/wxPython/generic.nix34
3 files changed, 34 insertions, 44 deletions
diff --git a/pkgs/development/python-modules/wxPython/2.8.nix b/pkgs/development/python-modules/wxPython/2.8.nix
deleted file mode 100644
index f0a452424158..000000000000
--- a/pkgs/development/python-modules/wxPython/2.8.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ callPackage, ... } @ args:
-
-callPackage ./generic.nix (args // rec {
-  version = "2.8.12.1";
-  sha256 = "1l1w4i113csv3bd5r8ybyj0qpxdq83lj6jrc5p7cc10mkwyiagqz";
-})
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 a5e0552a8c18..000000000000
--- a/pkgs/development/python-modules/wxPython/generic.nix
+++ /dev/null
@@ -1,34 +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;
-
-  sourceRoot = "wxPython-src-${version}/wxPython";
-
-  hardeningDisable = [ "format" ];
-
-  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;
-
-  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; };
-}