]> git.scottworley.com Git - pinch/blame - default.nix
Move git_cache out to a separate library
[pinch] / default.nix
CommitLineData
420bd8c9 1{ pkgs ? import <nixpkgs> { }, lint ? false }:
d06918bc
SW
2
3let
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
18in pkgs.python3Packages.callPackage
19({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, git-cache, }:
b5964ec3
SW
20 buildPythonPackage rec {
21 pname = "pinch";
25e38f08 22 version = "3.0.0-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 }