2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
boto3,
|
|
|
|
buildPythonPackage,
|
|
|
|
envs,
|
|
|
|
fetchFromGitHub,
|
|
|
|
freezegun,
|
|
|
|
mock,
|
|
|
|
moto,
|
|
|
|
pyjwt,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
requests-mock,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycognito";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2024.5.1";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pvizeli";
|
2024-06-05 15:53:02 +00:00
|
|
|
repo = "pycognito";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-U23fFLru4j6GnWMcYtsCW9BVJkVcCoefPH6oMijYGew=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2020-04-24 23:36:52 +00:00
|
|
|
boto3
|
|
|
|
envs
|
2024-04-21 15:54:59 +00:00
|
|
|
pyjwt
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ pyjwt.optional-dependencies.crypto;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
freezegun
|
2021-02-05 17:12:51 +00:00
|
|
|
mock
|
2022-04-15 01:41:22 +00:00
|
|
|
moto
|
2021-02-05 17:12:51 +00:00
|
|
|
pytestCheckHook
|
2022-04-15 01:41:22 +00:00
|
|
|
requests-mock
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ moto.optional-dependencies.cognitoidp;
|
2021-04-12 18:23:04 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pytestFlagsArray = [ "tests.py" ];
|
2021-04-12 18:23:04 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabledTests = [
|
2024-06-05 15:53:02 +00:00
|
|
|
# Test requires network access
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_srp_requests_http_auth"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pythonImportsCheck = [ "pycognito" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python class to integrate Boto3's Cognito client so it is easy to login users. With SRP support";
|
2021-04-12 18:23:04 +00:00
|
|
|
homepage = "https://github.com/pvizeli/pycognito";
|
2024-06-05 15:53:02 +00:00
|
|
|
changelog = "https://github.com/NabuCasa/pycognito/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2021-04-12 18:23:04 +00:00
|
|
|
maintainers = with maintainers; [ mic92 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|