]> git.scottworley.com Git - pinch/blame - default.nix
Release 3.0.10
[pinch] / default.nix
CommitLineData
420bd8c9 1{ pkgs ? import <nixpkgs> { }, lint ? false }:
d06918bc
SW
2
3let
f9bfb2d0 4
f9bfb2d0 5 git-cache-fallback = { buildPythonPackage, fetchgit, git, backoff, mypy, }:
d06918bc
SW
6 buildPythonPackage rec {
7 pname = "git-cache";
75076e7d 8 version = "1.4.2";
d06918bc 9 src = fetchgit {
efc59d86 10 url = "https://git.scottworley.com/pub/git/git-cache";
d06918bc 11 rev = "v${version}";
75076e7d 12 hash = "sha256-Z9daNCmjzaVdeG3mITRWdNM+ewUEcKy5N4/Xpdotsg0=";
d06918bc 13 };
f9bfb2d0 14 propagatedBuildInputs = [ backoff ];
d06918bc
SW
15 checkInputs = [ git mypy ];
16 doCheck = true;
17 checkPhase = "./test.sh";
18 };
19
5144c1d3 20in pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, nix_2_3, git
f2f22eb2 21 , autopep8, makeWrapper, mypy, pylint, git-cache, }:
b5964ec3
SW
22 buildPythonPackage rec {
23 pname = "pinch";
df45b011 24 version = "3.0.10";
b5964ec3 25 src = lib.cleanSource ./.;
f2f22eb2 26 buildInputs = [ makeWrapper ];
d06918bc 27 propagatedBuildInputs = [ git-cache ];
5144c1d3 28 checkInputs = [ nix_2_3 git mypy ] ++ lib.optionals lint [ autopep8 pylint ];
f2f22eb2 29 postInstall = ''
5144c1d3 30 wrapProgram "$out/bin/pinch" --prefix PATH : ${nix_2_3}/bin
f2f22eb2 31 '';
b5964ec3
SW
32 doCheck = true;
33 checkPhase = "./test.sh";
d06918bc
SW
34 }) {
35 git-cache =
36 pkgs.python3Packages.git-cache or (pkgs.python3Packages.callPackage
f8305e1d 37 git-cache-fallback { });
5144c1d3 38 nix_2_3 = pkgs.nix_2_3 or pkgs.nix;
d06918bc 39 }