1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pytest-asyncio
6, pytest-mock
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "circuitbreaker";
12 version = "2.0.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromGitHub {
18 owner = "fabfuel";
19 repo = pname;
20 rev = "refs/tags/${version}";
21 hash = "sha256-jaDCMGCZZu3STluYeHDNgdEPf2DNq7bXJ0LPV3JZdk0=";
22 };
23
24 nativeCheckInputs = [
25 pytestCheckHook
26 pytest-asyncio
27 pytest-mock
28 ];
29
30 pythonImportsCheck = [
31 "circuitbreaker"
32 ];
33
34 meta = with lib; {
35 description = "Python Circuit Breaker implementation";
36 homepage = "https://github.com/fabfuel/circuitbreaker";
37 license = with licenses; [ bsd3 ];
38 maintainers = with maintainers; [ fab ];
39 };
40}