about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyjwt/1.nix
blob: 285e5e2e7600dc27da557d04eabd53c22514b829 (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
{ lib
, buildPythonPackage
, fetchPypi
, cryptography
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "PyJWT";
  version = "1.7.1";

  src = fetchPypi {
    inherit pname version;
    sha256 = "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd";
  };

  postPatch = ''
    substituteInPlace setup.py --replace "pytest>=4.0.1,<5.0.0" "pytest"

    # drop coverage
    sed -i '/pytest-cov/d' setup.py
    sed -i '/--cov/d' setup.cfg
  '';

  propagatedBuildInputs = [
    cryptography
  ];

  checkInputs = [
    pytestCheckHook
  ];

  meta = with lib; {
    description = "JSON Web Token implementation in Python";
    homepage = "https://github.com/jpadilla/pyjwt";
    license = licenses.mit;
  };
}