summary refs log tree commit diff
path: root/pkgs/development/python-modules/wxPython
diff options
context:
space:
mode:
authorambrop7@gmail.com <Ambroz Bizjak>2014-03-25 22:32:39 +0100
committerambrop7@gmail.com <Ambroz Bizjak>2014-03-25 22:35:25 +0100
commit93d313c0ed34df4d4f8969d95c0cf721bb69f10c (patch)
tree1c70eda74066e0a399d5d15211650ed045208d3b /pkgs/development/python-modules/wxPython
parentae8a8b5deb305e2e8884d9f34a91a7ab28b62b1b (diff)
downloadnixpkgs-93d313c0ed34df4d4f8969d95c0cf721bb69f10c.tar
nixpkgs-93d313c0ed34df4d4f8969d95c0cf721bb69f10c.tar.gz
nixpkgs-93d313c0ed34df4d4f8969d95c0cf721bb69f10c.tar.bz2
nixpkgs-93d313c0ed34df4d4f8969d95c0cf721bb69f10c.tar.lz
nixpkgs-93d313c0ed34df4d4f8969d95c0cf721bb69f10c.tar.xz
nixpkgs-93d313c0ed34df4d4f8969d95c0cf721bb69f10c.tar.zst
nixpkgs-93d313c0ed34df4d4f8969d95c0cf721bb69f10c.zip
Add wxPython-3.0 with OpenGL support.
Diffstat (limited to 'pkgs/development/python-modules/wxPython')
-rw-r--r--pkgs/development/python-modules/wxPython/3.0.nix25
-rw-r--r--pkgs/development/python-modules/wxPython/builder3.0.sh22
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/wxPython/3.0.nix b/pkgs/development/python-modules/wxPython/3.0.nix
new file mode 100644
index 00000000000..9aa6148643b
--- /dev/null
+++ b/pkgs/development/python-modules/wxPython/3.0.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, pkgconfig, wxGTK, pythonPackages, openglSupport ? true }:
+
+assert wxGTK.unicode;
+
+with stdenv.lib;
+
+let version = "3.0.0.0"; in
+
+stdenv.mkDerivation {
+  name = "wxPython-${version}";
+  
+  builder = ./builder3.0.sh;
+  
+  src = fetchurl {
+    url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
+    sha256 = "af88695e820dd914e8375dc91ecb736f6fb605979bb38460ace61bbea494dc11";
+  };
+  
+  buildInputs = [ pkgconfig wxGTK (wxGTK.gtk) pythonPackages.python pythonPackages.wrapPython ]
+                ++ optional openglSupport pythonPackages.pyopengl;
+
+  inherit openglSupport;
+
+  passthru = { inherit wxGTK openglSupport; };
+}
diff --git a/pkgs/development/python-modules/wxPython/builder3.0.sh b/pkgs/development/python-modules/wxPython/builder3.0.sh
new file mode 100644
index 00000000000..7403c67d091
--- /dev/null
+++ b/pkgs/development/python-modules/wxPython/builder3.0.sh
@@ -0,0 +1,22 @@
+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