2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fetchpatch2,
|
|
|
|
setuptools,
|
|
|
|
hkdf,
|
|
|
|
pytestCheckHook,
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spake2";
|
|
|
|
version = "0.8";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "c17a614b29ee4126206e22181f70a406c618d3c6c62ca6d6779bce95e9c926f4";
|
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/warner/python-spake2/pull/16
|
|
|
|
(fetchpatch2 {
|
|
|
|
name = "python312-compat.patch";
|
|
|
|
url = "https://github.com/warner/python-spake2/commit/1b04d33106b105207c97c64b2589c45790720b0b.patch";
|
|
|
|
hash = "sha256-OoBz0lN17VyVGg6UfT+Zj9M1faFTNpPIhxrwCgUwMc8=";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ hkdf ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "spake2" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/warner/python-spake2/blob/v${version}/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "SPAKE2 password-authenticated key exchange library";
|
|
|
|
homepage = "https://github.com/warner/python-spake2";
|
|
|
|
license = licenses.mit;
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|