3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/commitizen/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

94 lines
2 KiB
Nix
Raw Normal View History

2022-01-03 19:48:50 +00:00
{ buildPythonApplication
, colorama
, decli
2022-02-22 19:27:30 +00:00
, fetchFromGitHub
, git
2022-01-03 19:48:50 +00:00
, jinja2
2022-02-22 19:27:30 +00:00
, lib
2022-01-26 07:25:23 +00:00
, packaging
2022-11-29 05:18:28 +00:00
, poetry-core
2022-01-26 07:25:38 +00:00
, pytest-freezegun
, pytest-mock
, pytest-regressions
2022-02-22 19:27:30 +00:00
, pytestCheckHook
, pyyaml
, questionary
, termcolor
, tomlkit
, typing-extensions
, argcomplete
2022-10-28 21:20:06 +01:00
, nix-update-script
2022-01-03 19:48:50 +00:00
}:
buildPythonApplication rec {
pname = "commitizen";
2022-10-28 21:18:37 +01:00
version = "2.37.0";
2022-01-03 19:48:50 +00:00
src = fetchFromGitHub {
owner = "commitizen-tools";
repo = pname;
rev = "v${version}";
2022-10-28 21:18:37 +01:00
hash = "sha256-wo1I6QDWLxByHISmkPdass+BcKh0oxR5hD31UN/5+WQ=";
2022-01-26 07:25:38 +00:00
deepClone = true;
2022-01-03 19:48:50 +00:00
};
format = "pyproject";
2022-11-29 05:18:28 +00:00
nativeBuildInputs = [ poetry-core ];
2022-01-03 19:48:50 +00:00
propagatedBuildInputs = [
termcolor
questionary
colorama
decli
tomlkit
jinja2
pyyaml
argcomplete
2022-01-03 19:48:50 +00:00
typing-extensions
2022-01-26 07:25:23 +00:00
packaging
2022-01-03 19:48:50 +00:00
];
2022-01-26 07:25:38 +00:00
doCheck = true;
2022-01-26 07:25:38 +00:00
checkInputs = [
pytestCheckHook
pytest-freezegun
pytest-mock
pytest-regressions
argcomplete
2022-01-26 07:25:38 +00:00
git
];
# the tests require a functional git installation
# which requires a valid HOME directory.
preCheck = ''
export HOME="$(mktemp -d)"
git config --global user.name "Nix Builder"
git config --global user.email "nix-builder@nixos.org"
git init .
'';
# NB: These tests require complex GnuPG setup
2022-01-26 07:25:38 +00:00
disabledTests = [
"test_bump_minor_increment_signed"
"test_bump_minor_increment_signed_config_file"
2022-01-26 07:25:38 +00:00
"test_bump_on_git_with_hooks_no_verify_enabled"
"test_bump_on_git_with_hooks_no_verify_disabled"
"test_bump_pre_commit_changelog"
"test_bump_pre_commit_changelog_fails_always"
2022-01-26 07:25:38 +00:00
"test_get_commits_with_signature"
];
passthru.updateScript = nix-update-script { };
2022-10-28 21:20:06 +01:00
2022-01-03 19:48:50 +00:00
meta = with lib; {
description = "Tool to create committing rules for projects, auto bump versions, and generate changelogs";
homepage = "https://github.com/commitizen-tools/commitizen";
2022-10-28 21:18:37 +01:00
changelog = "https://github.com/commitizen-tools/commitizen/blob/v${version}/CHANGELOG.md";
2022-01-03 19:48:50 +00:00
license = licenses.mit;
maintainers = with maintainers; [ lovesegfault anthonyroussel ];
2022-01-03 19:48:50 +00:00
};
}