]> git.scottworley.com Git - git-cache/blame - default.nix
--force flag to recover from remote force-push
[git-cache] / default.nix
CommitLineData
bef7ce53 1{ pkgs ? import <nixpkgs> { }, lint ? false }:
f36d5c6f
SW
2
3let
4 # Remove this package definition after https://github.com/NixOS/nixpkgs/pull/93377 reaches stable
5 backoff-fallback = { lib, buildPythonPackage, fetchPypi }:
6 buildPythonPackage rec {
7 pname = "backoff";
8 version = "1.10.0";
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "190rdpfhpjvb6bjh99fhdkgfsfkjwky7nz7b0nn5ah67z8hs1yxq";
12 };
13 meta = with lib; {
14 description = "Function decoration for backoff and retry";
15 homepage = "https://github.com/litl/backoff";
16 license = licenses.mit;
17 maintainers = with maintainers; [ chkno ];
18 };
19 };
20
21in pkgs.python3Packages.callPackage
22({ lib, buildPythonPackage, nix, git, backoff, autopep8, mypy, pylint, }:
bef7ce53
SW
23 buildPythonPackage rec {
24 pname = "git-cache";
866f2918 25 version = "1.4.0-pre";
bef7ce53 26 src = lib.cleanSource ./.;
f36d5c6f 27 propagatedBuildInputs = [ backoff ];
bef7ce53
SW
28 checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ];
29 doCheck = true;
30 checkPhase = "./test.sh";
f36d5c6f
SW
31 }) {
32 backoff = pkgs.python3Packages.backoff or (pkgs.python3Packages.callPackage
33 backoff-fallback { });
34 }