diff options
author | Jaakko Luttinen <jaakko.luttinen@iki.fi> | 2017-09-03 15:58:31 +0300 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2017-09-04 11:09:32 +0200 |
commit | 81d2549e8b49fdf3f6e826dc96ad602d822b2714 (patch) | |
tree | 62dfaa4e9a633bd1f46e4f2582251f9ed4869997 /pkgs/development | |
parent | fd2c1fe610cdf463f21cdabe9a6280277ba34525 (diff) | |
download | nixlib-81d2549e8b49fdf3f6e826dc96ad602d822b2714.tar nixlib-81d2549e8b49fdf3f6e826dc96ad602d822b2714.tar.gz nixlib-81d2549e8b49fdf3f6e826dc96ad602d822b2714.tar.bz2 nixlib-81d2549e8b49fdf3f6e826dc96ad602d822b2714.tar.lz nixlib-81d2549e8b49fdf3f6e826dc96ad602d822b2714.tar.xz nixlib-81d2549e8b49fdf3f6e826dc96ad602d822b2714.tar.zst nixlib-81d2549e8b49fdf3f6e826dc96ad602d822b2714.zip |
pythonPackages.txtorcon: init at 0.19.3
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/python-modules/txtorcon/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/txtorcon/default.nix b/pkgs/development/python-modules/txtorcon/default.nix new file mode 100644 index 000000000000..60947bc769c7 --- /dev/null +++ b/pkgs/development/python-modules/txtorcon/default.nix @@ -0,0 +1,39 @@ +{lib, buildPythonPackage, fetchPypi, isPy3k, incremental, ipaddress, twisted +, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof +, GeoIP}: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "txtorcon"; + version = "0.19.3"; + + 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; + sha256 = "1za4qag4g2lbw695v4ssxqc2aspdyknnbn2diylwg8q9g5k9cczp"; + }; + + # ipaddress isn't required for Python 3 although it's in requirements.txt. + # Because ipaddress doesn't install on Python 3, remove the requirement so the + # installation of this package doesn't fail on Python 3. + postPatch = "" + lib.optionalString isPy3k '' + substituteInPlace requirements.txt --replace "ipaddress>=1.0.16" "" + ''; + + checkPhase = '' + pytest . + ''; + + meta = { + description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions"; + homepage = https://github.com/meejah/txtorcon; + maintainers = with lib.maintainers; [ jluttine ]; + license = lib.licenses.mit; + }; +} |