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-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
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|