1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, setuptools
5, setuptools-scm
6, parsley
7, twisted
8, python
9}:
10
11buildPythonPackage rec {
12 pname = "txi2p-tahoe";
13 version = "0.3.7";
14
15 format = "pyproject";
16
17 src = fetchFromGitHub {
18 owner = "tahoe-lafs";
19 repo = "txi2p";
20 rev = "refs/tags/${version}";
21 hash = "sha256-u/IOhxK9jWC/tTKKLsc4PexbCuki+yEtMNw7LuQKmuk=";
22 };
23
24 nativeBuildInputs = [
25 setuptools
26 setuptools-scm
27 ];
28
29 SETUPTOOLS_SCM_PRETEND_VERSION = version;
30
31 propagatedBuildInputs = [
32 parsley
33 twisted
34 ];
35
36 pythonImportsCheck = [ "txi2p" ];
37
38 checkPhase = ''
39 runHook preCheck
40 ${python.interpreter} -m twisted.trial txi2p
41 runHook postCheck
42 '';
43
44 meta = {
45 description = "I2P bindings for Twisted";
46 homepage = "https://github.com/tahoe-lafs/txi2p";
47 license = lib.licenses.isc;
48 maintainers = with lib.maintainers; [ dotlambda ];
49 };
50}