Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 22.05-pre 35 lines 1.1 kB view raw
1{ lib, python, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, incremental, ipaddress, twisted 2, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof 3, GeoIP}: 4 5buildPythonPackage rec { 6 pname = "txtorcon"; 7 version = "21.1.0"; 8 9 checkInputs = [ pytest mock lsof GeoIP ]; 10 propagatedBuildInputs = [ 11 incremental twisted automat zope_interface 12 # extra dependencies required by twisted[tls] 13 idna pyopenssl service-identity 14 ] ++ lib.optionals (!isPy3k) [ ipaddress ]; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "aebf0b9ec6c69a029f6b61fd534e785692e28fdcd2fd003ce3cc132b9393b7d6"; 19 }; 20 21 # Based on what txtorcon tox.ini will automatically test, allow back as far 22 # as Python 3.5. 23 disabled = pythonOlder "3.5"; 24 25 checkPhase = '' 26 ${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES ./test 27 ''; 28 29 meta = { 30 description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions"; 31 homepage = "https://github.com/meejah/txtorcon"; 32 maintainers = with lib.maintainers; [ jluttine exarkun ]; 33 license = lib.licenses.mit; 34 }; 35}