diff --git a/pkgs/development/python-modules/justbackoff/default.nix b/pkgs/development/python-modules/justbackoff/default.nix new file mode 100644 index 000000000000..814d1d3e53f3 --- /dev/null +++ b/pkgs/development/python-modules/justbackoff/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "justbackoff"; + version = "0.6.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "alexferl"; + repo = pname; + rev = "v${version}"; + sha256 = "097j6jxgl4b3z46x9y9z10643vnr9v831vhagrxzrq6nviil2z6l"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "pytest-runner>=5.2" "" + ''; + + pythonImportsCheck = [ + "justbackoff" + ]; + + meta = with lib; { + description = "Simple backoff algorithm in Python"; + homepage = "https://github.com/alexferl/justbackoff"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e7b7e9017fac..7e956f79d55f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4093,6 +4093,8 @@ in { jupytext = callPackage ../development/python-modules/jupytext { }; + justbackoff = callPackage ../development/python-modules/justbackoff { }; + jwcrypto = callPackage ../development/python-modules/jwcrypto { }; jxmlease = callPackage ../development/python-modules/jxmlease { };