depot/third_party/nixpkgs/pkgs/applications/version-management/gitlint/default.nix
Default email 83405b6dd2 Project import generated by Copybara.
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
2023-03-15 17:39:30 +01:00

53 lines
1.1 KiB
Nix

{ lib
, buildPythonApplication
, fetchFromGitHub
, gitMinimal
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "gitlint";
version = "0.19.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "jorisroovers";
repo = "gitlint";
rev = "refs/tags/v${version}";
hash = "sha256-4SGkkC4LjZXTDXwK6jMOIKXR1qX76CasOwSqv8XUrjs=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
# Upstream splitted the project into gitlint and gitlint-core to
# simplify the dependency handling
sourceRoot = "source/gitlint-core";
nativeBuildInputs = with python3.pkgs; [
hatch-vcs
hatchling
];
propagatedBuildInputs = with python3.pkgs; [
arrow
click
sh
];
nativeCheckInputs = with python3.pkgs; [
gitMinimal
pytestCheckHook
];
pythonImportsCheck = [
"gitlint"
];
meta = with lib; {
description = "Linting for your git commit messages";
homepage = "https://jorisroovers.com/gitlint/";
changelog = "https://github.com/jorisroovers/gitlint/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ ethancedwards8 fab ];
};
}