summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2016-08-31 11:01:16 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2016-09-01 16:16:31 +0200
commit4f6b6f14726296c1d402f187db995031bccd791f (patch)
tree56b714c2eb6d16e4bfd98f9c64c84fbfbac3c031 /pkgs/development/python-modules
parente9c4d00cacea699c0e23e7c09967dd3fe12edc23 (diff)
downloadnixpkgs-4f6b6f14726296c1d402f187db995031bccd791f.tar
nixpkgs-4f6b6f14726296c1d402f187db995031bccd791f.tar.gz
nixpkgs-4f6b6f14726296c1d402f187db995031bccd791f.tar.bz2
nixpkgs-4f6b6f14726296c1d402f187db995031bccd791f.tar.lz
nixpkgs-4f6b6f14726296c1d402f187db995031bccd791f.tar.xz
nixpkgs-4f6b6f14726296c1d402f187db995031bccd791f.tar.zst
nixpkgs-4f6b6f14726296c1d402f187db995031bccd791f.zip
pythonPackages: use mkPythonDerivation
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/dbus/default.nix16
-rw-r--r--pkgs/development/python-modules/pycairo/default.nix8
-rw-r--r--pkgs/development/python-modules/pygobject/3.nix10
-rw-r--r--pkgs/development/python-modules/pygobject/default.nix8
-rw-r--r--pkgs/development/python-modules/pygtksourceview/default.nix6
-rw-r--r--pkgs/development/python-modules/pyqt/4.x.nix15
-rw-r--r--pkgs/development/python-modules/pyqt/5.x.nix14
-rw-r--r--pkgs/development/python-modules/pyside/default.nix2
-rw-r--r--pkgs/development/python-modules/pyxml/default.nix13
-rw-r--r--pkgs/development/python-modules/sip/default.nix10
10 files changed, 43 insertions, 59 deletions
diff --git a/pkgs/development/python-modules/dbus/default.nix b/pkgs/development/python-modules/dbus/default.nix
index e99a10ab1c4..f3f897ac9e7 100644
--- a/pkgs/development/python-modules/dbus/default.nix
+++ b/pkgs/development/python-modules/dbus/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchurl, python, pkgconfig, dbus, dbus_glib, dbus_tools, isPyPy
+{ lib, fetchurl, mkPythonDerivation, python, pkgconfig, dbus, dbus_glib, dbus_tools, isPyPy
 , ncurses, pygobject3 }:
 
-if isPyPy then throw "dbus-python not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec {
+if isPyPy then throw "dbus-python not supported for interpreter ${python.executable}" else mkPythonDerivation rec {
   name = "dbus-python-1.2.4";
 
   src = fetchurl {
@@ -11,21 +11,17 @@ if isPyPy then throw "dbus-python not supported for interpreter ${python.executa
 
   postPatch = "patchShebangs .";
 
-  buildInputs = [ python pkgconfig dbus dbus_glib ]
-    ++ stdenv.lib.optionals doCheck [ dbus_tools pygobject3 ]
+  buildInputs = [ pkgconfig dbus dbus_glib ]
+    ++ lib.optionals doCheck [ dbus_tools pygobject3 ]
     # My guess why it's sometimes trying to -lncurses.
     # It seems not to retain the dependency anyway.
-    ++ stdenv.lib.optional (! python ? modules) ncurses;
+    ++ lib.optional (! python ? modules) ncurses;
 
   doCheck = true;
 
-  # Set empty pythonPath, so that the package is recognized as a python package
-  # for python.buildEnv
-  pythonPath = [];
-
   meta = {
     description = "Python DBus bindings";
-    license = stdenv.lib.licenses.mit;
+    license = lib.licenses.mit;
     platforms = dbus.meta.platforms;
   };
 }
diff --git a/pkgs/development/python-modules/pycairo/default.nix b/pkgs/development/python-modules/pycairo/default.nix
index 433eb9d6b2a..fb95a9fa468 100644
--- a/pkgs/development/python-modules/pycairo/default.nix
+++ b/pkgs/development/python-modules/pycairo/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, fetchpatch, python, pkgconfig, cairo, xlibsWrapper, isPyPy, isPy35 }:
+{ lib, fetchurl, fetchpatch, python, mkPythonDerivation, pkgconfig, cairo, xlibsWrapper, isPyPy, isPy35 }:
 
-if (isPyPy) then throw "pycairo not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec {
+if (isPyPy) then throw "pycairo not supported for interpreter ${python.executable}" else mkPythonDerivation rec {
   version = "1.10.0";
   name = "${python.libPrefix}-pycairo-${version}";
   src = if python.is_py3k or false
@@ -32,7 +32,7 @@ if (isPyPy) then throw "pycairo not supported for interpreter ${python.executabl
       cd $(${python.executable} waf unpack)
       pwd
       patch -p1 < ${patch_waf}
-      ${stdenv.lib.optionalString isPy35 "patch -p1 < ${patch_waf-py3_5}"}
+      ${lib.optionalString isPy35 "patch -p1 < ${patch_waf-py3_5}"}
     )
 
     ${python.executable} waf configure --prefix=$out
@@ -40,5 +40,5 @@ if (isPyPy) then throw "pycairo not supported for interpreter ${python.executabl
   buildPhase = "${python.executable} waf";
   installPhase = "${python.executable} waf install";
 
-  meta.platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
+  meta.platforms = lib.platforms.linux ++ lib.platforms.darwin;
 }
diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix
index a6a4d367f1f..43882476b9d 100644
--- a/pkgs/development/python-modules/pygobject/3.nix
+++ b/pkgs/development/python-modules/pygobject/3.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, python, pkgconfig, glib, gobjectIntrospection, pycairo, cairo }:
+{ lib, fetchurl, mkPythonDerivation, python, pkgconfig, glib, gobjectIntrospection, pycairo, cairo }:
 
-stdenv.mkDerivation rec {
+mkPythonDerivation rec {
   major = "3.20";
   minor = "0";
   name = "pygobject-${major}.${minor}";
@@ -10,14 +10,12 @@ stdenv.mkDerivation rec {
     sha256 = "0ikzh3l7g1gjh8jj8vg6mdvrb25svp63gxcam4m0i404yh0lgari";
   };
 
-  buildInputs = [ python pkgconfig glib gobjectIntrospection ];
+  buildInputs = [ pkgconfig glib gobjectIntrospection ];
   propagatedBuildInputs = [ pycairo cairo ];
 
-  passthru.pythonPath = [];
-
   meta = {
     homepage = http://live.gnome.org/PyGObject;
     description = "Python bindings for Glib";
-    platforms = stdenv.lib.platforms.unix;
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix
index 3faba55d6a8..5c9367a1f46 100644
--- a/pkgs/development/python-modules/pygobject/default.nix
+++ b/pkgs/development/python-modules/pygobject/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, python, pkgconfig, glib }:
+{ stdenv, fetchurl, python, mkPythonDerivation, pkgconfig, glib }:
 
-stdenv.mkDerivation rec {
+mkPythonDerivation rec {
   name = "pygobject-2.28.6";
   
   src = fetchurl {
@@ -18,9 +18,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = "--disable-introspection";
 
-  buildInputs = [ python pkgconfig glib ];
-
-  passthru.pythonPath = [];
+  buildInputs = [ pkgconfig glib ];
 
   # in a "normal" setup, pygobject and pygtk are installed into the
   # same site-packages: we need a pth file for both. pygtk.py would be
diff --git a/pkgs/development/python-modules/pygtksourceview/default.nix b/pkgs/development/python-modules/pygtksourceview/default.nix
index 48019c62f3e..1c248251a32 100644
--- a/pkgs/development/python-modules/pygtksourceview/default.nix
+++ b/pkgs/development/python-modules/pygtksourceview/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchurl, python, pkgconfig, pygobject, glib, pygtk, gnome2 }:
+{ lib, fetchurl, python, mkPythonDerivation, pkgconfig, pygobject, glib, pygtk, gnome2 }:
 
 let version = "2.10.1"; in
 
-stdenv.mkDerivation {
+mkPythonDerivation {
   name = "pygtksourceview-${version}";
 
   src = fetchurl {
@@ -15,6 +15,6 @@ stdenv.mkDerivation {
   buildInputs = [ python pkgconfig pygobject glib pygtk gnome2.gtksourceview ];
 
   meta = {
-    platforms = stdenv.lib.platforms.unix;
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix
index 0eefce47e96..d335ce7b264 100644
--- a/pkgs/development/python-modules/pyqt/4.x.nix
+++ b/pkgs/development/python-modules/pyqt/4.x.nix
@@ -1,10 +1,10 @@
-{ stdenv, fetchurl, pythonPackages, qt4, pkgconfig, lndir, dbus_libs, makeWrapper }:
+{ lib, fetchurl, pythonPackages, qt4, pkgconfig, lndir, dbus_libs, makeWrapper }:
 
 let
   version = "4.11.3";
-  inherit (pythonPackages) python dbus-python sip;
-in stdenv.mkDerivation {
-  name = "${python.libPrefix}-PyQt-x11-gpl-${version}";
+  inherit (pythonPackages) mkPythonDerivation python dbus-python sip;
+in mkPythonDerivation {
+  name = "$PyQt-x11-gpl-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/pyqt/PyQt4/PyQt-${version}/PyQt-x11-gpl-${version}.tar.gz";
@@ -31,7 +31,7 @@ in stdenv.mkDerivation {
 
   buildInputs = [ pkgconfig makeWrapper qt4 lndir dbus_libs ];
 
-  propagatedBuildInputs = [ sip python ];
+  propagatedBuildInputs = [ sip ];
 
   postInstall = ''
     for i in $out/bin/*; do
@@ -42,7 +42,6 @@ in stdenv.mkDerivation {
   enableParallelBuilding = true;
 
   passthru = {
-    pythonPath = [];
     qt = qt4;
   };
 
@@ -50,7 +49,7 @@ in stdenv.mkDerivation {
     description = "Python bindings for Qt";
     license = "GPL";
     homepage = http://www.riverbankcomputing.co.uk;
-    maintainers = [ stdenv.lib.maintainers.sander ];
-    platforms = stdenv.lib.platforms.mesaPlatforms;
+    maintainers = [ lib.maintainers.sander ];
+    platforms = lib.platforms.mesaPlatforms;
   };
 }
diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix
index f5ee50a7352..2b54308e3f0 100644
--- a/pkgs/development/python-modules/pyqt/5.x.nix
+++ b/pkgs/development/python-modules/pyqt/5.x.nix
@@ -1,13 +1,13 @@
-{ stdenv, fetchurl, pythonPackages, pkgconfig, qtbase, qtsvg, qtwebkit, dbus_libs
+{ lib, fetchurl, pythonPackages, pkgconfig, qtbase, qtsvg, qtwebkit, dbus_libs
 , lndir, makeWrapper, qmakeHook }:
 
 let
   version = "5.6";
-  inherit (pythonPackages) python dbus-python sip;
-in stdenv.mkDerivation {
-  name = "${python.libPrefix}-PyQt-${version}";
+  inherit (pythonPackages) mkPythonDerivation python dbus-python sip;
+in mkPythonDerivation {
+  name = "PyQt-${version}";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Python bindings for Qt5";
     homepage    = http://www.riverbankcomputing.co.uk;
     license     = licenses.gpl3;
@@ -25,7 +25,7 @@ in stdenv.mkDerivation {
     qtbase qtsvg qtwebkit dbus_libs qmakeHook
   ];
 
-  propagatedBuildInputs = [ sip python ];
+  propagatedBuildInputs = [ sip ];
 
   configurePhase = ''
     runHook preConfigure
@@ -60,6 +60,4 @@ in stdenv.mkDerivation {
   '';
 
   enableParallelBuilding = true;
-
-  passthru.pythonPath = [];
 }
diff --git a/pkgs/development/python-modules/pyside/default.nix b/pkgs/development/python-modules/pyside/default.nix
index fc009a208b7..0bebcf60b53 100644
--- a/pkgs/development/python-modules/pyside/default.nix
+++ b/pkgs/development/python-modules/pyside/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, cmake, python, pysideGeneratorrunner, pysideShiboken, qt4 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkPythonDerivation rec {
   name = "${python.libPrefix}-pyside-${version}";
   version = "1.2.4";
 
diff --git a/pkgs/development/python-modules/pyxml/default.nix b/pkgs/development/python-modules/pyxml/default.nix
index 3c36565b526..abea143d11d 100644
--- a/pkgs/development/python-modules/pyxml/default.nix
+++ b/pkgs/development/python-modules/pyxml/default.nix
@@ -1,22 +1,21 @@
-{stdenv, fetchurl, python, makeWrapper}:
+{lib, fetchurl, python, mkPythonDerivation, makeWrapper}:
 
-stdenv.mkDerivation rec {
+mkPythonDerivation rec {
   name = "PyXML-0.8.4";
   src = fetchurl {
     url = "mirror://sourceforge/pyxml/${name}.tar.gz";
     sha256 = "04wc8i7cdkibhrldy6j65qp5l75zjxf5lx6qxdxfdf2gb3wndawz";
   };
 
-  buildInputs = [python makeWrapper];
-  buildPhase = "python ./setup.py build";
+  buildInputs = [ makeWrapper ];
+  buildPhase = "${python.interpreter} ./setup.py build";
   installPhase = ''
-    python ./setup.py install --prefix="$out" || exit 1
+    ${python.interpreter} ./setup.py install --prefix="$out" || exit 1
 
     for i in "$out/bin/"*
     do
-      # FIXME: We're assuming Python 2.4.
       wrapProgram "$i" --prefix PYTHONPATH :  \
-       "$out/lib/python2.4/site-packages" ||  \
+       "$out/${python.sitePackages}" ||  \
         exit 2
     done
   '';
diff --git a/pkgs/development/python-modules/sip/default.nix b/pkgs/development/python-modules/sip/default.nix
index cbee1867cf6..e44f92ab013 100644
--- a/pkgs/development/python-modules/sip/default.nix
+++ b/pkgs/development/python-modules/sip/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, python, isPyPy }:
+{ lib, fetchurl, mkPythonDerivation, python, isPyPy }:
 
-if isPyPy then throw "sip not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec {
+if isPyPy then throw "sip not supported for interpreter ${python.executable}" else mkPythonDerivation rec {
   name = "sip-4.18.1";
 
   src = fetchurl {
@@ -14,11 +14,7 @@ if isPyPy then throw "sip not supported for interpreter ${python.executable}" el
       -b $out/bin -e $out/include
   '';
 
-  buildInputs = [ python ];
-
-  passthru.pythonPath = [];
-
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Creates C++ bindings for Python modules";
     homepage    = "http://www.riverbankcomputing.co.uk/";
     license     = licenses.gpl2Plus;