34 lines
852 B
Nix
Raw Normal View History

2018-08-21 01:33:44 +02:00
{ lib, buildPythonPackage, fetchPypi
, cryptography, ecdsa
, pytestrunner, pytestcov, pytest }:
2018-08-21 01:33:44 +02:00
buildPythonPackage rec {
pname = "PyJWT";
2021-03-24 10:28:22 +01:00
version = "2.0.1";
2018-08-21 01:33:44 +02:00
src = fetchPypi {
inherit pname version;
2021-03-24 10:28:22 +01:00
sha256 = "a5c70a06e1f33d81ef25eecd50d50bd30e34de1ca8b2b9fa3fe0daaabcf69bf7";
2018-08-21 01:33:44 +02:00
};
propagatedBuildInputs = [ cryptography ecdsa ];
checkInputs = [ pytestrunner pytestcov pytest ];
2018-08-21 01:33:44 +02:00
postPatch = ''
substituteInPlace setup.py --replace "pytest>=4.0.1,<5.0.0" "pytest"
'';
2019-10-16 23:16:09 -07:00
# ecdsa changed internal behavior
checkPhase = ''
pytest tests -k 'not ec_verify_should_return_false_if_signature_invalid'
'';
2018-08-21 01:33:44 +02:00
meta = with lib; {
description = "JSON Web Token implementation in Python";
homepage = "https://github.com/jpadilla/pyjwt";
2018-08-21 01:33:44 +02:00
license = licenses.mit;
maintainers = with maintainers; [ prikhi ];
};
}