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