1{ 2 lib, 3 buildPythonPackage, 4 cryptography, 5 ecdsa, 6 fetchFromGitHub, 7 pyasn1, 8 pycrypto, 9 pycryptodome, 10 pytestCheckHook, 11 rsa, 12 setuptools, 13}: 14 15buildPythonPackage rec { 16 pname = "python-jose"; 17 version = "3.5.0"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "mpdavis"; 22 repo = "python-jose"; 23 tag = version; 24 hash = "sha256-8DQ0RBQ4ZgEIwcosgX3dzr928cYIQoH0obIOgk0+Ozs="; 25 }; 26 27 pythonRelaxDeps = [ 28 # https://github.com/mpdavis/python-jose/pull/376 29 "pyasn1" 30 ]; 31 32 build-system = [ setuptools ]; 33 34 dependencies = [ 35 ecdsa 36 pyasn1 37 rsa 38 ]; 39 40 optional-dependencies = { 41 cryptography = [ cryptography ]; 42 pycrypto = [ pycrypto ]; 43 pycryptodome = [ pycryptodome ]; 44 }; 45 46 nativeCheckInputs = [ 47 pytestCheckHook 48 ] 49 ++ lib.flatten (lib.attrValues optional-dependencies); 50 51 pythonImportsCheck = [ "jose" ]; 52 53 meta = with lib; { 54 description = "JOSE implementation in Python"; 55 homepage = "https://github.com/mpdavis/python-jose"; 56 changelog = "https://github.com/mpdavis/python-jose/releases/tag/${src.tag}"; 57 license = licenses.mit; 58 maintainers = [ ]; 59 }; 60}