]> git.scottworley.com Git - auto-upgrade-with-pinch/blame - overlays/pinch.nix
Follow rename: utillinux → util-linux
[auto-upgrade-with-pinch] / overlays / pinch.nix
CommitLineData
54354067
SW
1self: super:
2let
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";
7e0a3574 25 version = "1.3.1";
54354067 26 src = fetchgit {
bbc804af 27 url = "https://git.scottworley.com/pub/git/git-cache";
54354067 28 rev = "v${version}";
7e0a3574 29 sha256 = "0awz7f6avzw9fk9gp1kadj0nbmf1s60qic9zb6ww92zig3khg12k";
54354067
SW
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
c3a699cf 38 ({ buildPythonPackage, fetchgit, nix_2_3, git, makeWrapper, mypy, git-cache, }:
c1a6f7a3
SW
39 buildPythonPackage rec {
40 pname = "pinch";
c3a699cf 41 version = "3.0.9";
c1a6f7a3 42 src = fetchgit {
bbc804af 43 url = "https://git.scottworley.com/pub/git/pinch";
54354067 44 rev = "v${version}";
c3a699cf 45 sha256 = "sha256-D1XC8pmemdOpIEWvS0VH9Fguvp92FqpQfJj2TudfwRw=";
c1a6f7a3 46 };
d0a8d123 47 buildInputs = [ makeWrapper ];
54354067 48 propagatedBuildInputs = [ git-cache ];
c3a699cf 49 checkInputs = [ nix_2_3 git mypy ];
d0a8d123 50 postInstall = ''
c3a699cf 51 wrapProgram "$out/bin/pinch" --prefix PATH : ${nix_2_3}/bin
d0a8d123 52 '';
c1a6f7a3
SW
53 doCheck = true;
54 checkPhase = "./test.sh";
54354067
SW
55 }) { git-cache = self.python3Packages.git-cache or fallback-git-cache; };
56
57in { pinch = super.pinch or fallback-pinch; }