nixpkgs-suyu/pkgs/tools/misc/gitlint/default.nix

76 lines
1.6 KiB
Nix
Raw Normal View History

2021-06-21 05:50:16 +02:00
{ lib
, buildPythonApplication
, fetchFromGitHub
, gitMinimal
2021-07-09 12:46:49 +02:00
, python3
2021-06-21 05:50:16 +02:00
}:
2021-07-09 12:46:49 +02:00
let
py = python3.override {
packageOverrides = self: super: {
click = super.click.overridePythonAttrs (oldAttrs: rec {
version = "7.1.2";
src = oldAttrs.src.override {
inherit version;
sha256 = "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj";
};
});
arrow = super.arrow.overridePythonAttrs (oldAttrs: rec {
version = "1.0.3";
src = oldAttrs.src.override {
inherit version;
sha256 = "0793badh4hgbk2c5g70hmbl7n3d4g5d87bcflld0w9rjwy59r71r";
};
});
sh = super.sh.overridePythonAttrs (oldAttrs: rec {
version = "1.14.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "13hxgifab9ichla13qaa7sh8r0il7vs1r21js72s0n355zr9mair";
};
});
};
};
in
with py.pkgs;
2021-06-21 05:50:16 +02:00
buildPythonApplication rec {
pname = "gitlint";
version = "0.15.1";
src = fetchFromGitHub {
owner = "jorisroovers";
repo = "gitlint";
rev = "v${version}";
sha256 = "sha256-CqmE4V+svSuQAsoX0I3NpUqPU5CQf3fyCHJPrjUjHF4=";
};
2021-07-09 12:46:49 +02:00
nativeBuildInputs = [
wheel
];
2021-06-21 05:50:16 +02:00
propagatedBuildInputs = [
arrow
click
sh
];
preCheck = ''
export PATH="$out/bin:$PATH"
'';
checkInputs = [
gitMinimal
];
2021-07-09 12:46:49 +02:00
meta = with lib; {
2021-06-21 05:50:16 +02:00
description = "Linting for your git commit messages";
2021-07-09 12:46:49 +02:00
homepage = "https://jorisroovers.com/gitlint/";
license = licenses.mit;
maintainers = with maintainers; [ ethancedwards8 fab ];
2021-06-21 05:50:16 +02:00
};
}