Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 62 lines 1.3 kB view raw
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 gitMinimal, 6 versionCheckHook, 7 nix-update-script, 8}: 9 10python3Packages.buildPythonApplication rec { 11 pname = "gitlint"; 12 version = "0.19.1"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "jorisroovers"; 17 repo = "gitlint"; 18 tag = "v${version}"; 19 hash = "sha256-4SGkkC4LjZXTDXwK6jMOIKXR1qX76CasOwSqv8XUrjs="; 20 }; 21 22 # Upstream split the project into gitlint and gitlint-core to 23 # simplify the dependency handling 24 sourceRoot = "${src.name}/gitlint-core"; 25 26 build-system = with python3Packages; [ 27 hatch-vcs 28 hatchling 29 ]; 30 31 dependencies = with python3Packages; [ 32 arrow 33 click 34 sh 35 ]; 36 37 nativeCheckInputs = [ 38 gitMinimal 39 python3Packages.pytestCheckHook 40 versionCheckHook 41 ]; 42 versionCheckProgramArg = "--version"; 43 44 pythonImportsCheck = [ 45 "gitlint" 46 ]; 47 48 passthru.updateScript = nix-update-script { }; 49 50 meta = { 51 description = "Linting for your git commit messages"; 52 homepage = "https://jorisroovers.com/gitlint/"; 53 changelog = "https://github.com/jorisroovers/gitlint/releases/tag/v${version}"; 54 license = lib.licenses.mit; 55 maintainers = with lib.maintainers; [ 56 ethancedwards8 57 fab 58 matthiasbeyer 59 ]; 60 mainProgram = "gitlint"; 61 }; 62}