pythonPackages: use mkPythonDerivation
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 = [];
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user