]> git.scottworley.com Git - auto-upgrade-with-pinch/blame - overlays/pinch.nix
pinch: 3.0.15 → 3.1.0 for "git_ref = tag <tag>" support
[auto-upgrade-with-pinch] / overlays / pinch.nix
CommitLineData
54354067
SW
1self: super:
2let
567ba6eb
SW
3 checkInputsAreNative = self.lib.hasInfix "nativeCheckInputs"
4 (builtins.readFile <nixpkgs/doc/stdenv/stdenv.chapter.md>);
5 checkInputsName =
6 if checkInputsAreNative then "nativeCheckInputs" else "checkInputs";
54354067 7
54354067
SW
8 fallback-git-cache = self.python3Packages.callPackage
9 ({ buildPythonPackage, fetchgit, git, backoff, mypy, }:
10 buildPythonPackage rec {
11 pname = "git-cache";
beb12f9d 12 version = "1.5.0";
54354067 13 src = fetchgit {
bbc804af 14 url = "https://git.scottworley.com/pub/git/git-cache";
54354067 15 rev = "v${version}";
beb12f9d 16 hash = "sha256-g4TS/zX3e29Q3ThsCAX2wLLlYbi8fdux5uqAc+b/Oww=";
54354067
SW
17 };
18 propagatedBuildInputs = [ backoff ];
567ba6eb 19 "${checkInputsName}" = [ git mypy ];
54354067
SW
20 doCheck = true;
21 checkPhase = "./test.sh";
3ec7fc1a 22 }) { };
54354067
SW
23
24 fallback-pinch = self.python3Packages.callPackage
c3a699cf 25 ({ buildPythonPackage, fetchgit, nix_2_3, git, makeWrapper, mypy, git-cache, }:
c1a6f7a3
SW
26 buildPythonPackage rec {
27 pname = "pinch";
beb12f9d 28 version = "3.1.0";
c1a6f7a3 29 src = fetchgit {
bbc804af 30 url = "https://git.scottworley.com/pub/git/pinch";
54354067 31 rev = "v${version}";
beb12f9d 32 hash = "sha256-qwbYDSGE6p1YU3AnOatXNoTUc284D1xPQs/tRS++VOM=";
c1a6f7a3 33 };
d0a8d123 34 buildInputs = [ makeWrapper ];
54354067 35 propagatedBuildInputs = [ git-cache ];
567ba6eb 36 "${checkInputsName}" = [ nix_2_3 git mypy ];
d0a8d123 37 postInstall = ''
c3a699cf 38 wrapProgram "$out/bin/pinch" --prefix PATH : ${nix_2_3}/bin
d0a8d123 39 '';
c1a6f7a3
SW
40 doCheck = true;
41 checkPhase = "./test.sh";
54354067
SW
42 }) { git-cache = self.python3Packages.git-cache or fallback-git-cache; };
43
44in { pinch = super.pinch or fallback-pinch; }