2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-02-05 17:12:51 +00:00
|
|
|
, boto3
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, envs
|
2021-02-05 17:12:51 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
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
|
2020-04-24 23:36:52 +00:00
|
|
|
, python-jose
|
|
|
|
, requests
|
2022-04-15 01:41:22 +00:00
|
|
|
, requests-mock
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycognito";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "2022.08.0";
|
2021-04-12 18:23:04 +00:00
|
|
|
disabled = isPy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pvizeli";
|
2021-02-05 17:12:51 +00:00
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-A80iYF2zwM2YkhnwJMU/bZezsCzs389ro1fikG8vXSA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
boto3
|
|
|
|
envs
|
|
|
|
python-jose
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
checkInputs = [
|
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
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'python-jose[cryptography]' 'python-jose'
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pytestFlagsArray = [ "tests.py" ];
|
2021-04-12 18:23:04 +00:00
|
|
|
|
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";
|
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
|
|
|
};
|
|
|
|
}
|