2018-08-21 00:33:44 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi
|
|
|
|
, cryptography, ecdsa
|
2018-12-04 15:43:01 +00:00
|
|
|
, pytestrunner, pytestcov, pytest }:
|
2018-08-21 00:33:44 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "PyJWT";
|
2019-02-14 07:37:26 +00:00
|
|
|
version = "1.7.1";
|
2018-08-21 00:33:44 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-14 07:37:26 +00:00
|
|
|
sha256 = "8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96";
|
2018-08-21 00:33:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cryptography ecdsa ];
|
|
|
|
|
2018-12-04 15:43:01 +00:00
|
|
|
checkInputs = [ pytestrunner pytestcov pytest ];
|
2018-08-21 00:33:44 +01:00
|
|
|
|
2019-08-18 10:00:56 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace "pytest>=4.0.1,<5.0.0" "pytest"
|
|
|
|
'';
|
|
|
|
|
2019-10-17 07:16:09 +01:00
|
|
|
# ecdsa changed internal behavior
|
|
|
|
checkPhase = ''
|
|
|
|
pytest tests -k 'not ec_verify_should_return_false_if_signature_invalid'
|
|
|
|
'';
|
|
|
|
|
2018-08-21 00:33:44 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "JSON Web Token implementation in Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/jpadilla/pyjwt";
|
2018-08-21 00:33:44 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ prikhi ];
|
|
|
|
};
|
|
|
|
}
|