]> git.scottworley.com Git - pinch/blob - default.nix
Release 3.0.0
[pinch] / default.nix
1 { pkgs ? import <nixpkgs> { }, lint ? false }:
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, }:
20 buildPythonPackage rec {
21 pname = "pinch";
22 version = "3.0.0";
23 src = lib.cleanSource ./.;
24 propagatedBuildInputs = [ git-cache ];
25 checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ];
26 doCheck = true;
27 checkPhase = "./test.sh";
28 }) {
29 git-cache =
30 pkgs.python3Packages.git-cache or (pkgs.python3Packages.callPackage
31 git-cache-fallback { });
32 }