Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / version-management / gitlint / default.nix
blob575cf96826d4c43b883929d6b4a59c7cb0acb08d
1 { lib
2 , buildPythonApplication
3 , fetchFromGitHub
4 , gitMinimal
5 , python3
6 }:
8 python3.pkgs.buildPythonApplication rec {
9   pname = "gitlint";
10   version = "0.19.1";
11   format = "pyproject";
13   src = fetchFromGitHub {
14     owner = "jorisroovers";
15     repo = "gitlint";
16     rev = "refs/tags/v${version}";
17     hash = "sha256-4SGkkC4LjZXTDXwK6jMOIKXR1qX76CasOwSqv8XUrjs=";
18   };
20   SETUPTOOLS_SCM_PRETEND_VERSION = version;
22   # Upstream splitted the project into gitlint and gitlint-core to
23   # simplify the dependency handling
24   sourceRoot = "${src.name}/gitlint-core";
26   nativeBuildInputs = with python3.pkgs; [
27     hatch-vcs
28     hatchling
29   ];
31   propagatedBuildInputs = with python3.pkgs; [
32     arrow
33     click
34     sh
35   ];
37   nativeCheckInputs = with python3.pkgs; [
38     gitMinimal
39     pytestCheckHook
40   ];
42   pythonImportsCheck = [
43     "gitlint"
44   ];
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   };