]> git.scottworley.com Git - auto-upgrade-with-pinch/blame - overlays/pinch.nix
pinch: 3.0.11 → 3.0.12
[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";
8bcd3374 12 version = "1.4.3";
54354067 13 src = fetchgit {
bbc804af 14 url = "https://git.scottworley.com/pub/git/git-cache";
54354067 15 rev = "v${version}";
8bcd3374 16 hash = "sha256-Qr62bGdlFFkzYTl6ot34UiOJxbP1Eeelx2OEd96vrqI=";
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";
37a39406 28 version = "3.0.12";
c1a6f7a3 29 src = fetchgit {
bbc804af 30 url = "https://git.scottworley.com/pub/git/pinch";
54354067 31 rev = "v${version}";
37a39406 32 hash = "sha256-1fsTPEDOidGI0IJMelZW4FB1VOP8RT+GSbDoL2vNUJY=";
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; }