]>
Commit | Line | Data |
---|---|---|
54354067 SW |
1 | self: super: |
2 | let | |
567ba6eb SW |
3 | checkInputsAreNative = self.lib.hasInfix "nativeCheckInputs" |
4 | (builtins.readFile <nixpkgs/doc/stdenv/stdenv.chapter.md>); | |
5 | checkInputsName = | |
6 | if checkInputsAreNative then "nativeCheckInputs" else "checkInputs"; | |
54354067 | 7 | |
54354067 SW |
8 | fallback-git-cache = self.python3Packages.callPackage |
9 | ({ buildPythonPackage, fetchgit, git, backoff, mypy, }: | |
10 | buildPythonPackage rec { | |
11 | pname = "git-cache"; | |
8bcd3374 | 12 | version = "1.4.3"; |
54354067 | 13 | src = fetchgit { |
bbc804af | 14 | url = "https://git.scottworley.com/pub/git/git-cache"; |
54354067 | 15 | rev = "v${version}"; |
8bcd3374 | 16 | hash = "sha256-Qr62bGdlFFkzYTl6ot34UiOJxbP1Eeelx2OEd96vrqI="; |
54354067 SW |
17 | }; |
18 | propagatedBuildInputs = [ backoff ]; | |
567ba6eb | 19 | "${checkInputsName}" = [ git mypy ]; |
54354067 SW |
20 | doCheck = true; |
21 | checkPhase = "./test.sh"; | |
3ec7fc1a | 22 | }) { }; |
54354067 SW |
23 | |
24 | fallback-pinch = self.python3Packages.callPackage | |
c3a699cf | 25 | ({ buildPythonPackage, fetchgit, nix_2_3, git, makeWrapper, mypy, git-cache, }: |
c1a6f7a3 SW |
26 | buildPythonPackage rec { |
27 | pname = "pinch"; | |
d07240cc | 28 | version = "3.0.11"; |
c1a6f7a3 | 29 | src = fetchgit { |
bbc804af | 30 | url = "https://git.scottworley.com/pub/git/pinch"; |
54354067 | 31 | rev = "v${version}"; |
d07240cc | 32 | hash = "sha256-VxlwqZVUzHOej+5dU03jdL/erJGXEKvOeNAs6K9/D9M="; |
c1a6f7a3 | 33 | }; |
d0a8d123 | 34 | buildInputs = [ makeWrapper ]; |
54354067 | 35 | propagatedBuildInputs = [ git-cache ]; |
567ba6eb | 36 | "${checkInputsName}" = [ nix_2_3 git mypy ]; |
d0a8d123 | 37 | postInstall = '' |
c3a699cf | 38 | wrapProgram "$out/bin/pinch" --prefix PATH : ${nix_2_3}/bin |
d0a8d123 | 39 | ''; |
c1a6f7a3 SW |
40 | doCheck = true; |
41 | checkPhase = "./test.sh"; | |
54354067 SW |
42 | }) { git-cache = self.python3Packages.git-cache or fallback-git-cache; }; |
43 | ||
44 | in { pinch = super.pinch or fallback-pinch; } |