2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, future, six, ecdsa, rsa
|
2020-06-15 15:56:04 +00:00
|
|
|
, pycrypto, pytestcov, pytestrunner, cryptography
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-jose";
|
2020-11-03 02:18:15 +00:00
|
|
|
version = "3.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mpdavis";
|
|
|
|
repo = "python-jose";
|
|
|
|
rev = version;
|
2020-11-03 02:18:15 +00:00
|
|
|
sha256 = "cSPIZrps0xFd4pPcQ4w/jFWOk2XYgd3mtE/sDzlytvY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pycrypto
|
2020-06-15 15:56:04 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
pytestcov
|
|
|
|
pytestrunner
|
|
|
|
cryptography # optional dependency, but needed in tests
|
|
|
|
];
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
# relax ecdsa deps
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'ecdsa<0.15' 'ecdsa' \
|
|
|
|
--replace 'ecdsa <0.15' 'ecdsa'
|
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/mpdavis/python-jose/issues/176
|
|
|
|
"test_key_too_short"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ future six ecdsa rsa ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/mpdavis/python-jose";
|
|
|
|
description = "A JOSE implementation in Python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.jhhuh ];
|
|
|
|
};
|
|
|
|
}
|