summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/py-vapid/default.nix
blob: 660a758a56140a869d91abfee69111a3d5aeccb1 (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  setuptools,
  mock,
  pytestCheckHook,
  cryptography,
}:

buildPythonPackage rec {
  pname = "py-vapid";
  version = "1.9.2";
  pyproject = true;

  src = fetchPypi {
    pname = "py_vapid";
    inherit version;
    hash = "sha256-PIlzts+DhK0MmuZNYnDMxIDguSxwLY9eoswD5rUSR/k=";
  };

  patches = [
    # Fix tests with latest cryptography
    # Upstream PR: https://github.com/web-push-libs/vapid/pull/110
    ./cryptography.patch
  ];

  build-system = [ setuptools ];

  dependencies = [ cryptography ];

  nativeCheckInputs = [
    mock
    pytestCheckHook
  ];

  meta = {
    description = "Library for VAPID header generation";
    mainProgram = "vapid";
    homepage = "https://github.com/mozilla-services/vapid";
    license = lib.licenses.mpl20;
    maintainers = [ ];
  };
}