1 { pkgs ? import <nixpkgs> { }, lint ? false }:
4 # Remove this package definition after https://github.com/NixOS/nixpkgs/pull/93377 reaches stable
5 backoff-fallback = { lib, buildPythonPackage, fetchPypi }:
6 buildPythonPackage rec {
10 inherit pname version;
11 sha256 = "190rdpfhpjvb6bjh99fhdkgfsfkjwky7nz7b0nn5ah67z8hs1yxq";
14 description = "Function decoration for backoff and retry";
15 homepage = "https://github.com/litl/backoff";
16 license = licenses.mit;
17 maintainers = with maintainers; [ chkno ];
21 in pkgs.python3Packages.callPackage
22 ({ lib, buildPythonPackage, nix, git, backoff, autopep8, mypy, pylint, }:
23 buildPythonPackage rec {
25 version = "1.2.0-pre";
26 src = lib.cleanSource ./.;
27 propagatedBuildInputs = [ backoff ];
28 checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ];
30 checkPhase = "./test.sh";
32 backoff = pkgs.python3Packages.backoff or (pkgs.python3Packages.callPackage
33 backoff-fallback { });