]> git.scottworley.com Git - auto-upgrade-with-pinch/blame_incremental - overlays/pinch.nix
Rely on nixpkgs' python3Packages.backoff
[auto-upgrade-with-pinch] / overlays / pinch.nix
... / ...
CommitLineData
1self: super:
2let
3
4 fallback-git-cache = self.python3Packages.callPackage
5 ({ buildPythonPackage, fetchgit, git, backoff, mypy, }:
6 buildPythonPackage rec {
7 pname = "git-cache";
8 version = "1.3.1";
9 src = fetchgit {
10 url = "https://git.scottworley.com/pub/git/git-cache";
11 rev = "v${version}";
12 sha256 = "0awz7f6avzw9fk9gp1kadj0nbmf1s60qic9zb6ww92zig3khg12k";
13 };
14 propagatedBuildInputs = [ backoff ];
15 checkInputs = [ git mypy ];
16 doCheck = true;
17 checkPhase = "./test.sh";
18 }) { };
19
20 fallback-pinch = self.python3Packages.callPackage
21 ({ buildPythonPackage, fetchgit, nix_2_3, git, makeWrapper, mypy, git-cache, }:
22 buildPythonPackage rec {
23 pname = "pinch";
24 version = "3.0.9";
25 src = fetchgit {
26 url = "https://git.scottworley.com/pub/git/pinch";
27 rev = "v${version}";
28 sha256 = "sha256-D1XC8pmemdOpIEWvS0VH9Fguvp92FqpQfJj2TudfwRw=";
29 };
30 buildInputs = [ makeWrapper ];
31 propagatedBuildInputs = [ git-cache ];
32 checkInputs = [ nix_2_3 git mypy ];
33 postInstall = ''
34 wrapProgram "$out/bin/pinch" --prefix PATH : ${nix_2_3}/bin
35 '';
36 doCheck = true;
37 checkPhase = "./test.sh";
38 }) { git-cache = self.python3Packages.git-cache or fallback-git-cache; };
39
40in { pinch = super.pinch or fallback-pinch; }