2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
asn1crypto,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-07-27 06:49:29 +00:00
|
|
|
hatchling,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-07-27 06:49:29 +00:00
|
|
|
versioningit,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
2020-11-19 00:13:47 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scramp";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.4.5";
|
|
|
|
pyproject = true;
|
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;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-KpododRJ+CYRGBR7Sr5cVBhJvUwh9YmPERd/DAJqEcY=";
|
2020-11-19 00:13:47 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [
|
|
|
|
hatchling
|
|
|
|
versioningit
|
2022-10-30 15:09:59 +00:00
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [ asn1crypto ];
|
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;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-11-19 00:13:47 +00:00
|
|
|
};
|
|
|
|
}
|