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