pythonPackages: use mkPythonDerivation

This commit is contained in:
Frederik Rietdijk
2016-08-31 11:01:16 +02:00
parent e9c4d00cac
commit 4f6b6f1472
13 changed files with 56 additions and 65 deletions

View File

@@ -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;
};
}