2022-01-24 22:03:24 +00:00
|
|
|
{ lib, stdenv, python, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, incremental, ipaddress, twisted
|
2017-09-05 10:16:41 +01:00
|
|
|
, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof
|
2021-11-12 09:22:34 +00:00
|
|
|
, GeoIP}:
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "txtorcon";
|
2021-08-22 11:31:30 +01:00
|
|
|
version = "21.1.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;
|
2021-08-22 11:31:30 +01:00
|
|
|
sha256 = "aebf0b9ec6c69a029f6b61fd534e785692e28fdcd2fd003ce3cc132b9393b7d6";
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
|
2021-08-09 13:50:08 +01:00
|
|
|
# Based on what txtorcon tox.ini will automatically test, allow back as far
|
|
|
|
# as Python 3.5.
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
2022-01-24 22:03:24 +00:00
|
|
|
doCheck = !(stdenv.isDarwin && stdenv.isAarch64);
|
2017-09-05 10:16:41 +01:00
|
|
|
checkPhase = ''
|
2021-08-09 13:50:08 +01:00
|
|
|
${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES ./test
|
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";
|
2021-08-09 13:50:08 +01:00
|
|
|
maintainers = with lib.maintainers; [ jluttine exarkun ];
|
2017-09-05 10:16:41 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
}
|