about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/joserfc/default.nix
blob: ce5e18ec1349555b1e788d91e4e22023a8b34c8f (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
51
52
53
54
55
56
57
{ lib
, buildPythonPackage
, fetchFromGitHub

# build-system
, setuptools

# dependencies
, cryptography
, pycryptodome

# tests
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "joserfc";
  version = "0.9.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "authlib";
    repo = "joserfc";
    rev = version;
    hash = "sha256-+NFCveMPzE0hSs2Qe20/MDHApXVtU3cR/GPFKPqfVV4=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    cryptography
  ];

  optional-dependencies = {
    drafts = [
      pycryptodome
    ];
  };

  nativeCheckInputs = [
    pytestCheckHook
  ]
  ++ lib.flatten (lib.attrValues optional-dependencies);

  pythonImportsCheck = [
    "joserfc"
  ];

  meta = with lib; {
    description = "Implementations of JOSE RFCs in Python";
    homepage = "https://github.com/authlib/joserfc";
    license = licenses.bsd3;
    maintainers = with maintainers; [ ];
  };
}