Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 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 disabled = pythonOlder "3.7"; 29 30 src = fetchFromGitHub { 31 owner = "bdraco"; 32 repo = pname; 33 rev = "refs/tags/v${version}"; 34 hash = "sha256-i6bhqfYo+gFTf3dqOBSQqGN4WPqbUR05StdwZvrVckI="; 35 }; 36 37 nativeBuildInputs = [ 38 cython 39 poetry-core 40 setuptools 41 ]; 42 43 pythonRelaxDeps = [ "cryptography" ]; 44 45 propagatedBuildInputs = [ cryptography ]; 46 47 pythonImportsCheck = [ "chacha20poly1305_reuseable" ]; 48 49 preCheck = '' 50 substituteInPlace pyproject.toml \ 51 --replace-fail "--cov=chacha20poly1305_reuseable --cov-report=term-missing:skip-covered" "" 52 ''; 53 54 nativeCheckInputs = [ pytestCheckHook ]; 55 56 meta = with lib; { 57 description = "ChaCha20Poly1305 that is reuseable for asyncio"; 58 homepage = "https://github.com/bdraco/chacha20poly1305-reuseable"; 59 changelog = "https://github.com/bdraco/chacha20poly1305-reuseable/blob/v${version}/CHANGELOG.md"; 60 license = licenses.asl20; 61 maintainers = with maintainers; [ hexa ]; 62 }; 63}