]> git.scottworley.com Git - auto-upgrade-with-pinch/blob - overlays/pinch.nix
2cae0b36ddd0abfc12211127ecd801d38932b969
[auto-upgrade-with-pinch] / overlays / pinch.nix
1 self: super:
2 let
3
4 # Pending upstream inclusion in https://github.com/NixOS/nixpkgs/pull/93377
5 fallback-backoff = self.python3Packages.callPackage ({ lib, buildPythonPackage
6 , fetchFromGitHub, pytestCheckHook, poetry, pytest-asyncio, }:
7 buildPythonPackage rec {
8 pname = "backoff";
9 version = "1.10.0";
10 src = fetchFromGitHub {
11 owner = "litl";
12 repo = pname;
13 rev = "v${version}";
14 sha256 = "1jj0l6pjx747d2yyvnzd3qbm4qr73sq6cc56dhvd8wqfbp5279x0";
15 };
16 format = "pyproject";
17 nativeBuildInputs = [ poetry ];
18 checkInputs = [ pytestCheckHook pytest-asyncio ];
19 }) { };
20
21 fallback-git-cache = self.python3Packages.callPackage
22 ({ buildPythonPackage, fetchgit, git, backoff, mypy, }:
23 buildPythonPackage rec {
24 pname = "git-cache";
25 version = "1.3.0";
26 src = fetchgit {
27 url = "https://scottworley.com/git-cache.git";
28 rev = "v${version}";
29 sha256 = "sha256-0HbtnS98im0sd2JIdUePBcspUskL2DY8ylQdyEC2sS0=";
30 };
31 propagatedBuildInputs = [ backoff ];
32 checkInputs = [ git mypy ];
33 doCheck = true;
34 checkPhase = "./test.sh";
35 }) { backoff = self.python3Packages.backoff or fallback-backoff; };
36
37 fallback-pinch = self.python3Packages.callPackage
38 ({ buildPythonPackage, fetchgit, nix, git, mypy, git-cache, }:
39 buildPythonPackage rec {
40 pname = "pinch";
41 version = "3.0.2";
42 src = fetchgit {
43 url = "https://scottworley.com/pinch.git";
44 rev = "v${version}";
45 sha256 = "sha256-bO0kMuaw/hkmDD1b8mkCDx0FAM6NIeUxvc+fOhHUXcs=";
46 };
47 propagatedBuildInputs = [ git-cache ];
48 checkInputs = [ nix git mypy ];
49 doCheck = true;
50 checkPhase = "./test.sh";
51 }) { git-cache = self.python3Packages.git-cache or fallback-git-cache; };
52
53 in { pinch = super.pinch or fallback-pinch; }