1{ lib, fetchurl, buildPythonPackage, python, pkgconfig, dbus, dbus-glib, isPyPy
2, ncurses, pygobject3 }:
3
4if isPyPy then throw "dbus-python not supported for interpreter ${python.executable}" else buildPythonPackage rec {
5 pname = "dbus-python";
6 version = "1.2.4";
7 format = "other";
8
9 src = fetchurl {
10 url = "http://dbus.freedesktop.org/releases/dbus-python/${pname}-${version}.tar.gz";
11 sha256 = "1k7rnaqrk7mdkg0k6n2jn3d1mxsl7s3i07g5a8va5yvl3y3xdwg2";
12 };
13
14 postPatch = "patchShebangs .";
15
16 nativeBuildInputs = [ pkgconfig ];
17 buildInputs = [ dbus dbus-glib ]
18 # My guess why it's sometimes trying to -lncurses.
19 # It seems not to retain the dependency anyway.
20 ++ lib.optional (! python ? modules) ncurses;
21
22 doCheck = true;
23 checkInputs = [ dbus.out pygobject3 ];
24
25 meta = {
26 description = "Python DBus bindings";
27 license = lib.licenses.mit;
28 platforms = dbus.meta.platforms;
29 };
30}