gitlint: fix and cleanup

This commit is contained in:
Gaetan Lepage 2025-04-02 15:22:54 +02:00
parent a3d845106e
commit c0ae55310e

View file

@ -1,15 +1,16 @@
{ {
lib, lib,
buildPythonApplication, python3Packages,
fetchFromGitHub, fetchFromGitHub,
gitMinimal, gitMinimal,
python3, versionCheckHook,
nix-update-script,
}: }:
python3.pkgs.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "gitlint"; pname = "gitlint";
version = "0.19.1"; version = "0.19.1";
format = "pyproject"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jorisroovers"; owner = "jorisroovers";
@ -22,32 +23,36 @@ python3.pkgs.buildPythonApplication rec {
# simplify the dependency handling # simplify the dependency handling
sourceRoot = "${src.name}/gitlint-core"; sourceRoot = "${src.name}/gitlint-core";
nativeBuildInputs = with python3.pkgs; [ build-system = with python3Packages; [
hatch-vcs hatch-vcs
hatchling hatchling
]; ];
propagatedBuildInputs = with python3.pkgs; [ dependencies = with python3Packages; [
arrow arrow
click click
sh sh
]; ];
nativeCheckInputs = with python3.pkgs; [ nativeCheckInputs = [
gitMinimal gitMinimal
pytestCheckHook python3Packages.pytestCheckHook
versionCheckHook
]; ];
versionCheckProgramArg = "--version";
pythonImportsCheck = [ pythonImportsCheck = [
"gitlint" "gitlint"
]; ];
meta = with lib; { passthru.updateScript = nix-update-script { };
meta = {
description = "Linting for your git commit messages"; description = "Linting for your git commit messages";
homepage = "https://jorisroovers.com/gitlint/"; homepage = "https://jorisroovers.com/gitlint/";
changelog = "https://github.com/jorisroovers/gitlint/releases/tag/v${version}"; changelog = "https://github.com/jorisroovers/gitlint/releases/tag/v${version}";
license = licenses.mit; license = lib.licenses.mit;
maintainers = with maintainers; [ maintainers = with lib.maintainers; [
ethancedwards8 ethancedwards8
fab fab
matthiasbeyer matthiasbeyer