1{ lib, buildPythonPackage, fetchFromGitHub
2, future, six, ecdsa, rsa
3, pycrypto, pytestcov, pytestrunner, cryptography
4, pytestCheckHook
5}:
6
7buildPythonPackage rec {
8 pname = "python-jose";
9 version = "3.2.0";
10
11 src = fetchFromGitHub {
12 owner = "mpdavis";
13 repo = "python-jose";
14 rev = version;
15 sha256 = "cSPIZrps0xFd4pPcQ4w/jFWOk2XYgd3mtE/sDzlytvY=";
16 };
17
18 checkInputs = [
19 pycrypto
20 pytestCheckHook
21 pytestcov
22 pytestrunner
23 cryptography # optional dependency, but needed in tests
24 ];
25
26 # relax ecdsa deps
27 patchPhase = ''
28 substituteInPlace setup.py \
29 --replace 'ecdsa<0.15' 'ecdsa' \
30 --replace 'ecdsa <0.15' 'ecdsa'
31 '';
32
33 disabledTests = [
34 # https://github.com/mpdavis/python-jose/issues/176
35 "test_key_too_short"
36 ];
37
38 propagatedBuildInputs = [ future six ecdsa rsa ];
39
40 meta = with lib; {
41 homepage = "https://github.com/mpdavis/python-jose";
42 description = "A JOSE implementation in Python";
43 license = licenses.mit;
44 maintainers = [ maintainers.jhhuh ];
45 };
46}