1{ lib
2, buildPythonApplication
3, fetchFromGitHub
4, gitMinimal
5, python3
6}:
7
8python3.pkgs.buildPythonApplication rec {
9 pname = "gitlint";
10 version = "0.19.1";
11 format = "pyproject";
12
13 src = fetchFromGitHub {
14 owner = "jorisroovers";
15 repo = "gitlint";
16 rev = "refs/tags/v${version}";
17 hash = "sha256-4SGkkC4LjZXTDXwK6jMOIKXR1qX76CasOwSqv8XUrjs=";
18 };
19
20 SETUPTOOLS_SCM_PRETEND_VERSION = version;
21
22 # Upstream splitted the project into gitlint and gitlint-core to
23 # simplify the dependency handling
24 sourceRoot = "${src.name}/gitlint-core";
25
26 nativeBuildInputs = with python3.pkgs; [
27 hatch-vcs
28 hatchling
29 ];
30
31 propagatedBuildInputs = with python3.pkgs; [
32 arrow
33 click
34 sh
35 ];
36
37 nativeCheckInputs = with python3.pkgs; [
38 gitMinimal
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [
43 "gitlint"
44 ];
45
46 meta = with lib; {
47 description = "Linting for your git commit messages";
48 homepage = "https://jorisroovers.com/gitlint/";
49 changelog = "https://github.com/jorisroovers/gitlint/releases/tag/v${version}";
50 license = licenses.mit;
51 maintainers = with maintainers; [ ethancedwards8 fab ];
52 };
53}