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