summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/backoff/default.nix
blob: 95653217decd25e216e914ab9e56b75c37788d60 (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,
  fetchFromGitHub,
  poetry-core,
  pytestCheckHook,
  pytest-asyncio_0,
  responses,
}:

buildPythonPackage rec {
  pname = "backoff";
  version = "2.2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "litl";
    repo = "backoff";
    tag = "v${version}";
    hash = "sha256-g8bYGJ6Kw6y3BUnuoP1IAye5CL0geH5l7pTb3xxq7jI=";
  };

  patches = [
    # https://github.com/litl/backoff/pull/220
    ./python314-compat.patch
  ];

  nativeBuildInputs = [ poetry-core ];

  nativeCheckInputs = [
    pytest-asyncio_0
    pytestCheckHook
    responses
  ];

  pythonImportsCheck = [ "backoff" ];

  meta = {
    description = "Function decoration for backoff and retry";
    homepage = "https://github.com/litl/backoff";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ chkno ];
  };
}