1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 cryptography, 11 pycryptodome, 12 13 # tests 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "joserfc"; 19 version = "1.0.1"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "authlib"; 24 repo = "joserfc"; 25 tag = version; 26 hash = "sha256-e7c1reeAo+3dyNuDRXPlzxOwWQbAcHe+bSRVlvSW2rw="; 27 }; 28 29 build-system = [ setuptools ]; 30 31 dependencies = [ cryptography ]; 32 33 optional-dependencies = { 34 drafts = [ pycryptodome ]; 35 }; 36 37 nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies); 38 39 pythonImportsCheck = [ "joserfc" ]; 40 41 meta = with lib; { 42 description = "Implementations of JOSE RFCs in Python"; 43 homepage = "https://github.com/authlib/joserfc"; 44 license = licenses.bsd3; 45 maintainers = [ ]; 46 }; 47}