summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/signedjson/default.nix
blob: e57a86c37f21c7691ee0fe17cde977cb49cfab22 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib
, buildPythonPackage
, canonicaljson
, fetchPypi
, importlib-metadata
, pynacl
, pytestCheckHook
, pythonOlder
, setuptools-scm
, typing-extensions
, unpaddedbase64
}:

buildPythonPackage rec {
  pname = "signedjson";
  version = "1.1.4";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-zZHFavU/Fp7wMsYunEoyktwViGaTMxjQWS40Yts9ZJI=";
  };

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    canonicaljson
    unpaddedbase64
    pynacl
  ] ++ lib.optionals (pythonOlder "3.8") [
    importlib-metadata
    typing-extensions
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "signedjson"
  ];

  meta = with lib; {
    description = "Sign JSON with Ed25519 signatures";
    homepage = "https://github.com/matrix-org/python-signedjson";
    license = licenses.asl20;
    maintainers = with maintainers; [ ];
  };
}