1{
2 lib,
3 stdenv,
4 automat,
5 buildPythonPackage,
6 cryptography,
7 fetchPypi,
8 geoip,
9 lsof,
10 mock,
11 pytestCheckHook,
12 pythonOlder,
13 setuptools,
14 twisted,
15 zope-interface,
16}:
17
18buildPythonPackage rec {
19 pname = "txtorcon";
20 version = "24.8.0";
21 pyproject = true;
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-vv4ZE42cjFMHtu5tT+RG0MIB/9HMQErrJl7ZAwmXitA=";
28 };
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 cryptography
34 twisted
35 automat
36 zope-interface
37 ]
38 ++ twisted.optional-dependencies.tls;
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 mock
43 lsof
44 geoip
45 ];
46
47 doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64);
48
49 pythonImportsCheck = [ "txtorcon" ];
50
51 meta = with lib; {
52 description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions";
53 homepage = "https://github.com/meejah/txtorcon";
54 changelog = "https://github.com/meejah/txtorcon/releases/tag/v${version}";
55 maintainers = with maintainers; [
56 jluttine
57 exarkun
58 ];
59 license = licenses.mit;
60 };
61}