mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 21:13:40 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, python
|
|
, dbus, pytest, pytest-cov, pytest-asyncio, pytest-timeout
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "dbus-next";
|
|
version = "0.2.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "altdesktop";
|
|
repo = "python-dbus-next";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-EKEQZFRUe+E65Z6DNCJFL5uCI5kbXrN7Tzd4O0X5Cqo=";
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
dbus
|
|
pytest
|
|
pytest-cov
|
|
pytest-asyncio
|
|
pytest-timeout
|
|
];
|
|
|
|
# test_peer_interface hits a timeout
|
|
# test_tcp_connection_with_forwarding fails due to dbus
|
|
# creating unix socket anyway on v1.14.4
|
|
checkPhase = ''
|
|
dbus-run-session --config-file=${dbus}/share/dbus-1/session.conf \
|
|
${python.interpreter} -m pytest -sv --cov=dbus_next \
|
|
-k "not test_peer_interface and not test_tcp_connection_with_forwarding"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A zero-dependency DBus library for Python with asyncio support";
|
|
homepage = "https://github.com/altdesktop/python-dbus-next";
|
|
changelog = "https://github.com/altdesktop/python-dbus-next/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ sfrijters ];
|
|
broken = stdenv.isDarwin;
|
|
};
|
|
}
|