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
|
|
|
|
, cryptography
|
|
|
|
, envs
|
2021-01-22 12:04:11 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
2020-03-18 17:02:39 +00:00
|
|
|
, python-jose
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycognito";
|
2021-01-22 11:58:32 +00:00
|
|
|
version = "0.1.5";
|
2020-03-18 17:02:39 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pvizeli";
|
2021-01-22 12:01:56 +00:00
|
|
|
repo = pname;
|
2020-03-18 17:02:39 +00:00
|
|
|
rev = version;
|
2021-01-22 11:58:32 +00:00
|
|
|
sha256 = "sha256-RJeHPCTuaLN+zB0N0FGt4qrTI6++1ks5iBn64Cx0Psc=";
|
2020-03-18 17:02:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'python-jose[cryptography]' 'python-jose'
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
boto3
|
|
|
|
envs
|
|
|
|
python-jose
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
disabled = isPy27;
|
|
|
|
|
2021-01-22 12:01:56 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "tests.py" ];
|
|
|
|
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";
|
|
|
|
homepage = "https://GitHub.com/pvizeli/pycognito";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
};
|
|
|
|
}
|