1{ lib 2, buildPythonPackage 3, fetchPypi 4, cryptography 5, pytestCheckHook 6}: 7 8buildPythonPackage rec { 9 pname = "PyJWT"; 10 version = "1.7.1"; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"; 15 }; 16 17 postPatch = '' 18 substituteInPlace setup.py --replace "pytest>=4.0.1,<5.0.0" "pytest" 19 20 # drop coverage 21 sed -i '/pytest-cov/d' setup.py 22 sed -i '/--cov/d' setup.cfg 23 ''; 24 25 propagatedBuildInputs = [ 26 cryptography 27 ]; 28 29 checkInputs = [ 30 pytestCheckHook 31 ]; 32 33 meta = with lib; { 34 description = "JSON Web Token implementation in Python"; 35 homepage = "https://github.com/jpadilla/pyjwt"; 36 license = licenses.mit; 37 }; 38}