1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 cryptography,
7 freezegun,
8 pytestCheckHook,
9 pytest-cov,
10}:
11
12buildPythonPackage rec {
13 pname = "jwt";
14 version = "1.3.1";
15 format = "setuptools";
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 inherit version;
20 owner = "GehirnInc";
21 repo = "python-jwt";
22 rev = "v${version}";
23 hash = "sha256-N1J8yBVX/O+92cRp+q2gA2cFsd+C7JjUR9jo0VGoINg=";
24 };
25
26 postPatch = ''
27 # pytest-flake8 is incompatible flake8 6.0.0 and currently unmaintained
28 substituteInPlace setup.cfg --replace "--flake8" ""
29 '';
30
31 propagatedBuildInputs = [ cryptography ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 freezegun
36 pytest-cov
37 ];
38
39 pythonImportsCheck = [ "jwt" ];
40
41 meta = with lib; {
42 description = "JSON Web Token library for Python 3";
43 homepage = "https://github.com/GehirnInc/python-jwt";
44 license = licenses.asl20;
45 maintainers = with maintainers; [ thornycrackers ];
46 };
47}