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