nixpkgs/pkgs/applications/version-management/gitlint/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.1 KiB
Nix
Raw Normal View History

2021-06-21 03:50:16 +00:00
{ lib
, buildPythonApplication
, fetchFromGitHub
, gitMinimal
2021-07-09 10:46:49 +00:00
, python3
2021-06-21 03:50:16 +00:00
}:
2021-12-04 18:36:49 +00:00
python3.pkgs.buildPythonApplication rec {
2021-06-21 03:50:16 +00:00
pname = "gitlint";
version = "0.19.1";
2023-03-09 00:29:16 +00:00
format = "pyproject";
2021-06-21 03:50:16 +00:00
src = fetchFromGitHub {
owner = "jorisroovers";
repo = "gitlint";
rev = "refs/tags/v${version}";
hash = "sha256-4SGkkC4LjZXTDXwK6jMOIKXR1qX76CasOwSqv8XUrjs=";
2021-06-21 03:50:16 +00:00
};
2021-12-04 18:36:49 +00:00
# Upstream splitted the project into gitlint and gitlint-core to
# simplify the dependency handling
sourceRoot = "${src.name}/gitlint-core";
2021-06-21 03:50:16 +00:00
2023-03-09 00:29:16 +00:00
nativeBuildInputs = with python3.pkgs; [
hatch-vcs
hatchling
];
2021-12-04 18:36:49 +00:00
propagatedBuildInputs = with python3.pkgs; [
2021-06-21 03:50:16 +00:00
arrow
click
sh
];
nativeCheckInputs = with python3.pkgs; [
2021-12-04 18:36:49 +00:00
gitMinimal
pytestCheckHook
];
pythonImportsCheck = [
"gitlint"
2021-06-21 03:50:16 +00:00
];
2021-07-09 10:46:49 +00:00
meta = with lib; {
2021-06-21 03:50:16 +00:00
description = "Linting for your git commit messages";
2021-07-09 10:46:49 +00:00
homepage = "https://jorisroovers.com/gitlint/";
changelog = "https://github.com/jorisroovers/gitlint/releases/tag/v${version}";
2021-07-09 10:46:49 +00:00
license = licenses.mit;
maintainers = with maintainers; [ ethancedwards8 fab ];
2023-11-27 01:17:53 +00:00
mainProgram = "gitlint";
2021-06-21 03:50:16 +00:00
};
}