1{
2 lib,
3 buildNpmPackage,
4 fetchFromGitHub,
5 versionCheckHook,
6 nix-update-script,
7}:
8
9let
10 version = "2.7.2";
11in
12buildNpmPackage {
13 pname = "git-conventional-commits";
14 inherit version;
15
16 src = fetchFromGitHub {
17 owner = "qoomon";
18 repo = "git-conventional-commits";
19 tag = "v${version}";
20 hash = "sha256-3X5AnpIzqszKjMqFgUr9wzyzDpnRJ94hcBJpQ8J9H/c=";
21 };
22
23 npmDepsHash = "sha256-XUDWvoJTpOQZCUyYbijD/hA1HVseHO19vAheJrPd1Gk=";
24
25 dontNpmBuild = true;
26
27 nativeInstallCheckInputs = [
28 versionCheckHook
29 ];
30 doInstallCheck = true;
31 versionCheckProgramArg = "--version";
32
33 passthru.updateScript = nix-update-script { };
34
35 meta = {
36 homepage = "https://github.com/qoomon/git-conventional-commits";
37 description = "Generate semantic versions, markdown changelogs, and validate commit messages";
38 changelog = "https://github.com/qoomon/git-conventional-commits/blob/v${version}/CHANGELOG.md";
39 license = lib.licenses.gpl3Only;
40 maintainers = with lib.maintainers; [ yzx9 ];
41 mainProgram = "git-conventional-commits";
42 };
43}