1{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch
2, mock
3, boto3, envs, python-jose, requests }:
4
5buildPythonPackage {
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 patches = [
18 (fetchpatch {
19 name = "fix-pip10-compat.patch";
20 url = "https://github.com/capless/warrant/commit/ae17d17d9888b9218a8facf6f6ad0bf4adae9a12.patch";
21 sha256 = "1lvqi2qfa3kxdz05ab2lc7xnd3piyvvnz9kla2jl4pchi876z17c";
22 })
23 ];
24
25 # this needs to go when 0.6.2 or later is released
26 postPatch = ''
27 substituteInPlace requirements.txt \
28 --replace "python-jose-cryptodome>=1.3.2" "python-jose>=2.0.0"
29 '';
30
31 checkInputs = [ mock ];
32
33 propagatedBuildInputs = [ boto3 envs python-jose requests ];
34
35 # all the checks are failing
36 doCheck = false;
37
38 meta = with lib; {
39 description = "Python library for using AWS Cognito with support for SRP";
40 homepage = "https://github.com/capless/warrant";
41 license = lib.licenses.asl20;
42 maintainers = with lib.maintainers; [ peterhoeg ];
43 };
44}