2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
# build-system
|
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
|
|
|
|
|
|
|
# propagates
|
|
|
|
, cryptography
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "chacha20poly1305-reuseable";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.12.1";
|
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;
|
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-jgbtDpl2hXmfzmsiIIG6+B3QoekuAjBJGMxQJPX4ynA=";
|
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
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"chacha20poly1305_reuseable"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "--cov=chacha20poly1305_reuseable --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|