2017-03-15 23:43:58 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub
|
2018-12-03 14:01:09 +00:00
|
|
|
, future, six, ecdsa, rsa
|
|
|
|
, pycrypto, pytest, pytestcov, pytestrunner, cryptography
|
2017-03-15 23:43:58 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 09:25:35 +00:00
|
|
|
pname = "python-jose";
|
2018-12-03 14:01:09 +00:00
|
|
|
version = "3.0.1";
|
2018-04-07 13:13:05 +00:00
|
|
|
|
2017-03-15 23:43:58 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mpdavis";
|
|
|
|
repo = "python-jose";
|
2018-12-03 14:01:09 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1ahq4m86z504bnlk9z473r7r3dprg5m39900rld797hbczdhqa4f";
|
2017-03-15 23:43:58 +00:00
|
|
|
};
|
|
|
|
|
2018-04-07 13:13:05 +00:00
|
|
|
checkInputs = [
|
2018-12-03 14:01:09 +00:00
|
|
|
pycrypto
|
2018-04-07 13:13:05 +00:00
|
|
|
pytest
|
2018-12-03 14:01:09 +00:00
|
|
|
pytestcov
|
|
|
|
pytestrunner
|
2018-08-30 16:39:11 +00:00
|
|
|
cryptography # optional dependency, but needed in tests
|
2017-03-15 23:43:58 +00:00
|
|
|
];
|
2018-04-07 13:13:05 +00:00
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
2019-08-18 08:47:55 +00:00
|
|
|
# https://github.com/mpdavis/python-jose/issues/149
|
|
|
|
PYTEST_ADDOPTS = "-k 'not test_invalid_claims_json and not test_invalid_claims'";
|
|
|
|
|
2018-12-03 14:01:09 +00:00
|
|
|
propagatedBuildInputs = [ future six ecdsa rsa ];
|
2018-04-07 13:13:05 +00:00
|
|
|
|
2017-03-15 23:43:58 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://github.com/mpdavis/python-jose;
|
2017-03-15 23:43:58 +00:00
|
|
|
description = "A JOSE implementation in Python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.jhhuh ];
|
|
|
|
};
|
|
|
|
}
|