]> git.scottworley.com Git - auto-upgrade-with-pinch/blob - overlays/pinch.nix
Drop 22.11 support: Just use "nativeCheckInputs"
[auto-upgrade-with-pinch] / overlays / pinch.nix
1 self: super:
2 let
3 fallback-git-cache = self.python3Packages.callPackage
4 ({ buildPythonPackage, fetchgit, git, backoff, mypy, }:
5 buildPythonPackage rec {
6 pname = "git-cache";
7 version = "1.5.0";
8 src = fetchgit {
9 url = "https://git.scottworley.com/pub/git/git-cache";
10 rev = "v${version}";
11 hash = "sha256-g4TS/zX3e29Q3ThsCAX2wLLlYbi8fdux5uqAc+b/Oww=";
12 };
13 propagatedBuildInputs = [ backoff ];
14 nativeCheckInputs = [ git mypy ];
15 doCheck = true;
16 checkPhase = "./test.sh";
17 }) { };
18
19 fallback-pinch = self.python3Packages.callPackage
20 ({ buildPythonPackage, fetchgit, nix_2_3, git, makeWrapper, mypy, git-cache, }:
21 buildPythonPackage rec {
22 pname = "pinch";
23 version = "3.1.0";
24 src = fetchgit {
25 url = "https://git.scottworley.com/pub/git/pinch";
26 rev = "v${version}";
27 hash = "sha256-qwbYDSGE6p1YU3AnOatXNoTUc284D1xPQs/tRS++VOM=";
28 };
29 buildInputs = [ makeWrapper ];
30 propagatedBuildInputs = [ git-cache ];
31 nativeCheckInputs = [ nix_2_3 git mypy ];
32 postInstall = ''
33 wrapProgram "$out/bin/pinch" --prefix PATH : ${nix_2_3}/bin
34 '';
35 doCheck = true;
36 checkPhase = "./test.sh";
37 }) { git-cache = self.python3Packages.git-cache or fallback-git-cache; };
38
39 in { pinch = super.pinch or fallback-pinch; }