summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-jose/default.nix
blob: cb99e5fa273b3658dc9c2aca0024c757bee991b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, buildPythonPackage, fetchFromGitHub
, six, ecdsa, rsa, future, pytest, cryptography, pycryptodome
}:

buildPythonPackage rec {
  pname = "python-jose";
  version = "3.0.0";

  # no tests in PyPI tarball
  src = fetchFromGitHub {
    owner = "mpdavis";
    repo = "python-jose";
    rev = version;
    sha256 = "1dq8v87abqxv07wi403ywjk9jg1da125fviycqzki48cjxx0dhwj";
  };

  checkInputs = [
    pytest
    # optional dependencies, but needed in tests
    cryptography pycryptodome
  ];
  checkPhase = ''
    py.test
  '';

  propagatedBuildInputs = [ six ecdsa rsa future ];

  meta = with stdenv.lib; {
    homepage = https://github.com/mpdavis/python-jose;
    description = "A JOSE implementation in Python";
    license = licenses.mit;
    maintainers = [ maintainers.jhhuh ];
  };
}