nixpkgs/pkgs/development/python-modules/pycognito/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.0 KiB
Nix
Raw Normal View History

2020-03-18 17:02:39 +00:00
{ lib
, boto3
2020-03-18 17:02:39 +00:00
, buildPythonPackage
, envs
, fetchFromGitHub
, isPy27
, freezegun
, mock
, moto
, pytestCheckHook
2020-03-18 17:02:39 +00:00
, python-jose
, requests
, requests-mock
2020-03-18 17:02:39 +00:00
}:
buildPythonPackage rec {
pname = "pycognito";
version = "2022.05.0";
disabled = isPy27;
2020-03-18 17:02:39 +00:00
src = fetchFromGitHub {
owner = "pvizeli";
repo = pname;
rev = "refs/tags/${version}";
sha256 = "sha256-KPZcfTFZCPV/3tQHOGA99uAyYPkvusCwZrefKwEMAOo=";
2020-03-18 17:02:39 +00:00
};
propagatedBuildInputs = [
boto3
envs
python-jose
requests
];
checkInputs = [
freezegun
mock
moto
pytestCheckHook
requests-mock
];
postPatch = ''
substituteInPlace setup.py \
--replace 'python-jose[cryptography]' 'python-jose'
'';
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";
2020-03-18 17:02:39 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ mic92 ];
2020-03-18 17:02:39 +00:00
};
}