2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
asn1crypto,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
importlib-metadata,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
2020-11-19 00:13:47 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scramp";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "1.4.4";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "pyproject";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-11-19 00:13:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tlocke";
|
|
|
|
repo = "scramp";
|
|
|
|
rev = version;
|
2022-11-04 12:27:35 +00:00
|
|
|
hash = "sha256-WOyv1fLSXG7p+WKs2QSwlsh8FSK/lxp6I1hPY0VIkKo=";
|
2020-11-19 00:13:47 +00:00
|
|
|
};
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2023-10-09 19:29:22 +00:00
|
|
|
wheel
|
2022-10-30 15:09:59 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ asn1crypto ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-11-19 00:13:47 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Upstream uses versioningit to set the version
|
2023-10-09 19:29:22 +00:00
|
|
|
sed -i "/versioningit >=/d" pyproject.toml
|
2022-10-30 15:09:59 +00:00
|
|
|
sed -i '/^name =.*/a version = "${version}"' pyproject.toml
|
|
|
|
sed -i "/dynamic =/d" pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "scramp" ];
|
2022-10-30 15:09:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests = [ "test_readme" ];
|
2020-11-19 00:13:47 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Implementation of the SCRAM authentication protocol";
|
|
|
|
homepage = "https://github.com/tlocke/scramp";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|