@@ -0,0 +1,36 @@
1+{ lib, buildPythonPackage, fetchFromGitHub, fetchPypi
2+, mock
3+, boto3, envs, python-jose, requests }:
4+
5+buildPythonPackage rec {
6+ pname = "warrant";
7+ version = "0.6.1";
8+
9+ # move to fetchPyPi when https://github.com/capless/warrant/issues/97 is fixed
10+ src = fetchFromGitHub {
11+ owner = "capless";
12+ repo = "warrant";
13+ rev = "ff2e4793d8479e770f2461ef7cbc0c15ee784395";
14+ sha256 = "0gw3crg64p1zx3k5js0wh0x5bldgs7viy4g8hld9xbka8q0374hi";
15+ };
16+
17+ # this needs to go when 0.6.2 or later is released
18+ postPatch = ''
19+ substituteInPlace requirements.txt \
20+ --replace "python-jose-cryptodome>=1.3.2" "python-jose>=2.0.0"
21+ '';
22+
23+ checkInputs = [ mock ];
24+
25+ propagatedBuildInputs = [ boto3 envs python-jose requests ];
26+
27+ # all the checks are failing
28+ doCheck = false;
29+
30+ meta = with lib; {
31+ description = "Python library for using AWS Cognito with support for SRP";
32+ homepage = https://github.com/capless/warrant;
33+ license = lib.licenses.asl20;
34+ maintainers = with lib.maintainers; [ peterhoeg ];
35+ };
36+}