1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 cython,
9 poetry-core,
10 setuptools,
11
12 # propagates
13 cryptography,
14
15 # tests
16 pytest-cov-stub,
17 pytestCheckHook,
18}:
19
20let
21 pname = "chacha20poly1305-reuseable";
22 version = "0.13.2";
23in
24
25buildPythonPackage {
26 inherit pname version;
27 pyproject = true;
28
29 disabled = pythonOlder "3.7";
30
31 src = fetchFromGitHub {
32 owner = "bdraco";
33 repo = "chacha20poly1305-reuseable";
34 tag = "v${version}";
35 hash = "sha256-i6bhqfYo+gFTf3dqOBSQqGN4WPqbUR05StdwZvrVckI=";
36 };
37
38 nativeBuildInputs = [
39 cython
40 poetry-core
41 setuptools
42 ];
43
44 pythonRelaxDeps = [ "cryptography" ];
45
46 propagatedBuildInputs = [ cryptography ];
47
48 pythonImportsCheck = [ "chacha20poly1305_reuseable" ];
49
50 nativeCheckInputs = [
51 pytest-cov-stub
52 pytestCheckHook
53 ];
54
55 meta = with lib; {
56 description = "ChaCha20Poly1305 that is reuseable for asyncio";
57 homepage = "https://github.com/bdraco/chacha20poly1305-reuseable";
58 changelog = "https://github.com/bdraco/chacha20poly1305-reuseable/blob/v${version}/CHANGELOG.md";
59 license = licenses.asl20;
60 maintainers = with maintainers; [ hexa ];
61 };
62}