]>
Commit | Line | Data |
---|---|---|
420bd8c9 | 1 | { pkgs ? import <nixpkgs> { }, lint ? false }: |
d06918bc SW |
2 | |
3 | let | |
4 | git-cache-fallback = { buildPythonPackage, fetchgit, git, mypy, }: | |
5 | buildPythonPackage rec { | |
6 | pname = "git-cache"; | |
7 | version = "1.0.0"; | |
8 | src = fetchgit { | |
9 | url = "https://scottworley.com/git-cache.git"; | |
10 | rev = "v${version}"; | |
11 | sha256 = "06mzjc424988n2s1h25x2bi3mxbk2pnba31zkjljgw4cgw2p9036"; | |
12 | }; | |
13 | checkInputs = [ git mypy ]; | |
14 | doCheck = true; | |
15 | checkPhase = "./test.sh"; | |
16 | }; | |
17 | ||
18 | in pkgs.python3Packages.callPackage | |
19 | ({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, git-cache, }: | |
b5964ec3 SW |
20 | buildPythonPackage rec { |
21 | pname = "pinch"; | |
5e9aa037 | 22 | version = "3.0.1-pre"; |
b5964ec3 | 23 | src = lib.cleanSource ./.; |
d06918bc | 24 | propagatedBuildInputs = [ git-cache ]; |
420bd8c9 | 25 | checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ]; |
b5964ec3 SW |
26 | doCheck = true; |
27 | checkPhase = "./test.sh"; | |
d06918bc SW |
28 | }) { |
29 | git-cache = | |
30 | pkgs.python3Packages.git-cache or (pkgs.python3Packages.callPackage | |
31 | git-cache-fallback { }); | |
32 | } |