2017-09-05 10:16:41 +01:00
|
|
|
{lib, buildPythonPackage, fetchPypi, isPy3k, incremental, ipaddress, twisted
|
|
|
|
, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof
|
2019-12-18 21:18:10 +00:00
|
|
|
, GeoIP, isPy27}:
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "txtorcon";
|
2020-04-07 07:57:54 +01:00
|
|
|
version = "20.0.0";
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
checkInputs = [ pytest mock lsof GeoIP ];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
incremental twisted automat zope_interface
|
|
|
|
# extra dependencies required by twisted[tls]
|
|
|
|
idna pyopenssl service-identity
|
|
|
|
] ++ lib.optionals (!isPy3k) [ ipaddress ];
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-04-07 07:57:54 +01:00
|
|
|
sha256 = "0yipb41w2icbj50d3z1j92d8w6xhbqd1rnmd31vzb5k3g20x0b0j";
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
|
2019-12-24 17:35:45 +00:00
|
|
|
# zope.interface issue
|
|
|
|
doCheck = isPy3k;
|
2018-02-10 11:11:07 +00:00
|
|
|
# Skip a failing test until fixed upstream:
|
|
|
|
# https://github.com/meejah/txtorcon/issues/250
|
2017-09-05 10:16:41 +01:00
|
|
|
checkPhase = ''
|
2018-02-10 11:11:07 +00:00
|
|
|
pytest --ignore=test/test_util.py .
|
2017-09-05 10:16:41 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions";
|
2020-04-07 07:57:54 +01:00
|
|
|
homepage = "https://github.com/meejah/txtorcon";
|
2017-09-05 10:16:41 +01:00
|
|
|
maintainers = with lib.maintainers; [ jluttine ];
|
2019-12-18 21:18:10 +00:00
|
|
|
# Currently broken on Python 2.7. See
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/71826
|
|
|
|
broken = isPy27;
|
2017-09-05 10:16:41 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
}
|