X-Git-Url: http://git.scottworley.com/git-cache/blobdiff_plain/839f8d8d2d0815257660e29fe8caea1db3a914a8..8b40ac7a2ce64cbc26e46584827a95112b5e2239:/default.nix?ds=inline diff --git a/default.nix b/default.nix index 0a040cf..6f7e8c5 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,34 @@ { pkgs ? import { }, lint ? false }: -pkgs.python3Packages.callPackage -({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, }: + +let + # Remove this package definition after https://github.com/NixOS/nixpkgs/pull/93377 reaches stable + backoff-fallback = { lib, buildPythonPackage, fetchPypi }: + buildPythonPackage rec { + pname = "backoff"; + version = "1.10.0"; + src = fetchPypi { + inherit pname version; + sha256 = "190rdpfhpjvb6bjh99fhdkgfsfkjwky7nz7b0nn5ah67z8hs1yxq"; + }; + meta = with lib; { + description = "Function decoration for backoff and retry"; + homepage = "https://github.com/litl/backoff"; + license = licenses.mit; + maintainers = with maintainers; [ chkno ]; + }; + }; + +in pkgs.python3Packages.callPackage +({ lib, buildPythonPackage, nix, git, backoff, autopep8, mypy, pylint, }: buildPythonPackage rec { pname = "git-cache"; - version = "1.1.0"; + version = "1.2.3-pre"; src = lib.cleanSource ./.; + propagatedBuildInputs = [ backoff ]; checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ]; doCheck = true; checkPhase = "./test.sh"; - }) { } + }) { + backoff = pkgs.python3Packages.backoff or (pkgs.python3Packages.callPackage + backoff-fallback { }); + }