@@ -0,0 +1,41 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestCheckHook
5+, pythonOlder
6+}:
7+
8+buildPythonPackage rec {
9+ pname = "justbackoff";
10+ version = "0.6.0";
11+ format = "setuptools";
12+
13+ disabled = pythonOlder "3.8";
14+
15+ src = fetchFromGitHub {
16+ owner = "alexferl";
17+ repo = pname;
18+ rev = "v${version}";
19+ sha256 = "097j6jxgl4b3z46x9y9z10643vnr9v831vhagrxzrq6nviil2z6l";
20+ };
21+
22+ checkInputs = [
23+ pytestCheckHook
24+ ];
25+
26+ postPatch = ''
27+ substituteInPlace setup.py \
28+ --replace "pytest-runner>=5.2" ""
29+ '';
30+
31+ pythonImportsCheck = [
32+ "justbackoff"
33+ ];
34+
35+ meta = with lib; {
36+ description = "Simple backoff algorithm in Python";
37+ homepage = "https://github.com/alexferl/justbackoff";
38+ license = with licenses; [ mit ];
39+ maintainers = with maintainers; [ fab ];
40+ };
41+}