]> git.scottworley.com Git - auto-upgrade-with-pinch/blob - overlays/pinch.nix
d71672068917bbd625fe67347a71e00bc3f1996f
[auto-upgrade-with-pinch] / overlays / pinch.nix
1 self: super:
2 let
3 fallback-git-cache = self.python3Packages.callPackage (
4 {
5 buildPythonPackage,
6 fetchgit,
7 setuptools,
8 git,
9 backoff,
10 mypy,
11 }:
12 buildPythonPackage rec {
13 pname = "git-cache";
14 version = "1.5.0";
15 src = fetchgit {
16 url = "https://git.scottworley.com/pub/git/git-cache";
17 rev = "v${version}";
18 hash = "sha256-g4TS/zX3e29Q3ThsCAX2wLLlYbi8fdux5uqAc+b/Oww=";
19 };
20 pyproject = true;
21 build-system = [ setuptools ];
22 propagatedBuildInputs = [ backoff ];
23 nativeCheckInputs = [
24 git
25 mypy
26 ];
27 doCheck = true;
28 checkPhase = "./test.sh";
29 }
30 ) { };
31
32 fallback-pinch = self.python3Packages.callPackage (
33 {
34 buildPythonPackage,
35 fetchgit,
36 setuptools,
37 nix,
38 git,
39 mypy,
40 git-cache,
41 }:
42 buildPythonPackage rec {
43 pname = "pinch";
44 version = "3.3.2";
45 src = fetchgit {
46 url = "https://git.scottworley.com/pub/git/pinch";
47 rev = "v${version}";
48 hash = "sha256-UB1hAEX7bD2TfdDv5EOWH1aaLluvzvpW80EjdCBuCCU=";
49 };
50 pyproject = true;
51 build-system = [ setuptools ];
52 propagatedBuildInputs = [ git-cache ];
53 nativeCheckInputs = [
54 nix
55 git
56 mypy
57 ];
58 doCheck = true;
59 checkPhase = "./test.sh";
60 }
61 ) { git-cache = self.python3Packages.git-cache or fallback-git-cache; };
62
63 in
64 {
65 pinch = super.pinch or fallback-pinch;
66 }