]> git.scottworley.com Git - auto-upgrade-with-pinch/blame - overlays/pinch.nix
When becoming other users, cd to / with pushd, not sudo -D
[auto-upgrade-with-pinch] / overlays / pinch.nix
CommitLineData
54354067
SW
1self: super:
2let
54354067
SW
3 fallback-git-cache = self.python3Packages.callPackage
4 ({ buildPythonPackage, fetchgit, git, backoff, mypy, }:
5 buildPythonPackage rec {
6 pname = "git-cache";
beb12f9d 7 version = "1.5.0";
54354067 8 src = fetchgit {
bbc804af 9 url = "https://git.scottworley.com/pub/git/git-cache";
54354067 10 rev = "v${version}";
beb12f9d 11 hash = "sha256-g4TS/zX3e29Q3ThsCAX2wLLlYbi8fdux5uqAc+b/Oww=";
54354067
SW
12 };
13 propagatedBuildInputs = [ backoff ];
a4ddb411 14 nativeCheckInputs = [ git mypy ];
54354067
SW
15 doCheck = true;
16 checkPhase = "./test.sh";
3ec7fc1a 17 }) { };
54354067
SW
18
19 fallback-pinch = self.python3Packages.callPackage
c3a699cf 20 ({ buildPythonPackage, fetchgit, nix_2_3, git, makeWrapper, mypy, git-cache, }:
c1a6f7a3
SW
21 buildPythonPackage rec {
22 pname = "pinch";
beb12f9d 23 version = "3.1.0";
c1a6f7a3 24 src = fetchgit {
bbc804af 25 url = "https://git.scottworley.com/pub/git/pinch";
54354067 26 rev = "v${version}";
beb12f9d 27 hash = "sha256-qwbYDSGE6p1YU3AnOatXNoTUc284D1xPQs/tRS++VOM=";
c1a6f7a3 28 };
d0a8d123 29 buildInputs = [ makeWrapper ];
54354067 30 propagatedBuildInputs = [ git-cache ];
a4ddb411 31 nativeCheckInputs = [ nix_2_3 git mypy ];
d0a8d123 32 postInstall = ''
c3a699cf 33 wrapProgram "$out/bin/pinch" --prefix PATH : ${nix_2_3}/bin
d0a8d123 34 '';
c1a6f7a3
SW
35 doCheck = true;
36 checkPhase = "./test.sh";
54354067
SW
37 }) { git-cache = self.python3Packages.git-cache or fallback-git-cache; };
38
39in { pinch = super.pinch or fallback-pinch; }