at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 cryptography, 7 pytestCheckHook, 8 sphinxHook, 9 sphinx-rtd-theme, 10 zope-interface, 11 oauthlib, 12}: 13 14buildPythonPackage rec { 15 pname = "pyjwt"; 16 version = "2.10.1"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "jpadilla"; 21 repo = "pyjwt"; 22 tag = version; 23 hash = "sha256-BPVythRLpglYtpLEoaC7+Q4l9izYXH2M9JEbxdyQZqU="; 24 }; 25 26 outputs = [ 27 "out" 28 "doc" 29 ]; 30 31 build-system = [ setuptools ]; 32 33 nativeBuildInputs = [ 34 sphinxHook 35 sphinx-rtd-theme 36 zope-interface 37 ]; 38 39 optional-dependencies.crypto = [ cryptography ]; 40 41 nativeCheckInputs = [ pytestCheckHook ] ++ (lib.flatten (lib.attrValues optional-dependencies)); 42 43 disabledTests = [ 44 # requires internet connection 45 "test_get_jwt_set_sslcontext_default" 46 ]; 47 48 pythonImportsCheck = [ "jwt" ]; 49 50 passthru.tests = { 51 inherit oauthlib; 52 }; 53 54 meta = with lib; { 55 changelog = "https://github.com/jpadilla/pyjwt/blob/${version}/CHANGELOG.rst"; 56 description = "JSON Web Token implementation in Python"; 57 homepage = "https://github.com/jpadilla/pyjwt"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ prikhi ]; 60 }; 61}