2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
cython,
|
|
|
|
poetry-core,
|
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# propagates
|
|
|
|
cryptography,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "chacha20poly1305-reuseable";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.12.2";
|
2022-07-14 12:49:19 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdraco";
|
|
|
|
repo = pname;
|
2024-07-27 06:49:29 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-RESSkMWkmlmYarLOI8pX5mwgcr8xAigbp1mrAQP/QNU=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2022-07-14 12:49:19 +00:00
|
|
|
poetry-core
|
2023-04-12 12:48:02 +00:00
|
|
|
setuptools
|
2022-07-14 12:49:19 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ cryptography ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "chacha20poly1305_reuseable" ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "--cov=chacha20poly1305_reuseable --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "ChaCha20Poly1305 that is reuseable for asyncio";
|
|
|
|
homepage = "https://github.com/bdraco/chacha20poly1305-reuseable";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/bdraco/chacha20poly1305-reuseable/blob/v${version}/CHANGELOG.md";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|