summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-jose/default.nix
blob: 68150935da96afcbd8e2bf4a419678642d2a6aa8 (plain) (blame)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ lib
, buildPythonPackage
, fetchFromGitHub
, ecdsa
, rsa
, pycrypto
, pyasn1
, pycryptodome
, cryptography
, pytestCheckHook
}:

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

  src = fetchFromGitHub {
    owner = "mpdavis";
    repo = pname;
    rev = version;
    hash = "sha256-6VGC6M5oyGCOiXcYp6mpyhL+JlcYZKIqOQU9Sm/TkKM=";
  };

  propagatedBuildInputs = [
    cryptography
    ecdsa
    pyasn1
    pycrypto
    pycryptodome
    rsa
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace '"pytest-runner",' ""
  '';

  pythonImportsCheck = [ "jose" ];

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