2020-03-18 17:02:39 +00:00
|
|
|
{ lib
|
2021-01-22 12:04:11 +00:00
|
|
|
, boto3
|
2020-03-18 17:02:39 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, envs
|
2021-01-22 12:04:11 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
2022-03-02 21:42:13 +00:00
|
|
|
, freezegun
|
2021-01-22 12:04:11 +00:00
|
|
|
, mock
|
2022-03-02 21:42:13 +00:00
|
|
|
, moto
|
2021-01-22 12:04:11 +00:00
|
|
|
, pytestCheckHook
|
2020-03-18 17:02:39 +00:00
|
|
|
, python-jose
|
|
|
|
, requests
|
2022-03-02 21:42:13 +00:00
|
|
|
, requests-mock
|
2020-03-18 17:02:39 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycognito";
|
2022-07-16 11:59:26 +01:00
|
|
|
version = "2022.05.0";
|
2021-04-11 11:08:45 +01:00
|
|
|
disabled = isPy27;
|
2020-03-18 17:02:39 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pvizeli";
|
2021-01-22 12:01:56 +00:00
|
|
|
repo = pname;
|
2022-07-16 11:59:26 +01:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
sha256 = "sha256-KPZcfTFZCPV/3tQHOGA99uAyYPkvusCwZrefKwEMAOo=";
|
2020-03-18 17:02:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
boto3
|
|
|
|
envs
|
|
|
|
python-jose
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2021-01-22 12:01:56 +00:00
|
|
|
checkInputs = [
|
2022-03-02 21:42:13 +00:00
|
|
|
freezegun
|
2021-01-22 12:01:56 +00:00
|
|
|
mock
|
2022-03-02 21:42:13 +00:00
|
|
|
moto
|
2021-01-22 12:01:56 +00:00
|
|
|
pytestCheckHook
|
2022-03-02 21:42:13 +00:00
|
|
|
requests-mock
|
2021-01-22 12:01:56 +00:00
|
|
|
];
|
|
|
|
|
2021-04-11 11:08:45 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'python-jose[cryptography]' 'python-jose'
|
|
|
|
'';
|
|
|
|
|
2021-01-22 12:01:56 +00:00
|
|
|
pytestFlagsArray = [ "tests.py" ];
|
2021-04-11 11:08:45 +01:00
|
|
|
|
2021-01-22 12:01:56 +00:00
|
|
|
pythonImportsCheck = [ "pycognito" ];
|
2020-03-18 17:02:39 +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-11 11:08:45 +01:00
|
|
|
homepage = "https://github.com/pvizeli/pycognito";
|
2020-03-18 17:02:39 +00:00
|
|
|
license = licenses.asl20;
|
2021-04-11 11:08:45 +01:00
|
|
|
maintainers = with maintainers; [ mic92 ];
|
2020-03-18 17:02:39 +00:00
|
|
|
};
|
|
|
|
}
|