2017-03-16 00:43:58 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub
|
2018-12-03 15:01:09 +01:00
|
|
|
, future, six, ecdsa, rsa
|
|
|
|
, pycrypto, pytest, pytestcov, pytestrunner, cryptography
|
2017-03-16 00:43:58 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 11:25:35 +02:00
|
|
|
pname = "python-jose";
|
2020-03-18 18:03:11 +01:00
|
|
|
version = "3.1.0";
|
2018-04-07 15:13:05 +02:00
|
|
|
|
2017-03-16 00:43:58 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mpdavis";
|
|
|
|
repo = "python-jose";
|
2018-12-03 15:01:09 +01:00
|
|
|
rev = version;
|
2020-03-18 18:03:11 +01:00
|
|
|
sha256 = "1gnn0zy03pywj65ammy3sd07knzhjv8n5jhx1ir9bikgra9v0iqh";
|
2017-03-16 00:43:58 +01:00
|
|
|
};
|
|
|
|
|
2018-04-07 15:13:05 +02:00
|
|
|
checkInputs = [
|
2018-12-03 15:01:09 +01:00
|
|
|
pycrypto
|
2018-04-07 15:13:05 +02:00
|
|
|
pytest
|
2018-12-03 15:01:09 +01:00
|
|
|
pytestcov
|
|
|
|
pytestrunner
|
2018-08-30 18:39:11 +02:00
|
|
|
cryptography # optional dependency, but needed in tests
|
2017-03-16 00:43:58 +01:00
|
|
|
];
|
2018-04-07 15:13:05 +02:00
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
2019-08-18 10:47:55 +02: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 15:01:09 +01:00
|
|
|
propagatedBuildInputs = [ future six ecdsa rsa ];
|
2018-04-07 15:13:05 +02:00
|
|
|
|
2017-03-16 00:43:58 +01:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/mpdavis/python-jose";
|
2017-03-16 00:43:58 +01:00
|
|
|
description = "A JOSE implementation in Python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.jhhuh ];
|
|
|
|
};
|
|
|
|
}
|