2021-05-28 09:39:13 +00:00
|
|
|
{ lib, stdenv, fetchPypi, buildPythonPackage, python, pkg-config, dbus, dbus-glib, isPyPy
|
2020-11-12 09:05:59 +00:00
|
|
|
, ncurses, pygobject3, isPy3k }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dbus-python";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.2.18";
|
2020-04-24 23:36:52 +00:00
|
|
|
format = "other";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "0q3jrw515z98mqdk9x822nd95rky455zz9876f1nqna5igkd3gcj";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./fix-includedir.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
disabled = isPyPy;
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
|
|
|
|
MACOSX_DEPLOYMENT_TARGET=10.16
|
|
|
|
'' else null;
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
configureFlags = [
|
|
|
|
"PYTHON_VERSION=${lib.versions.major python.version}"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ dbus dbus-glib ]
|
|
|
|
# My guess why it's sometimes trying to -lncurses.
|
|
|
|
# It seems not to retain the dependency anyway.
|
|
|
|
++ lib.optional (! python ? modules) ncurses;
|
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
doCheck = isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [ dbus.out pygobject3 ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Python DBus bindings";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = dbus.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|