2022-01-26 04:04:25 +00:00
|
|
|
{ buildPythonApplication
|
|
|
|
, colorama
|
|
|
|
, decli
|
2022-03-05 16:20:37 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, git
|
2022-01-26 04:04:25 +00:00
|
|
|
, jinja2
|
2022-03-05 16:20:37 +00:00
|
|
|
, lib
|
2022-01-27 00:19:43 +00:00
|
|
|
, packaging
|
2022-03-05 16:20:37 +00:00
|
|
|
, poetry
|
2022-01-27 00:19:43 +00:00
|
|
|
, pytest-freezegun
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-regressions
|
2022-03-05 16:20:37 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pyyaml
|
|
|
|
, questionary
|
|
|
|
, termcolor
|
|
|
|
, tomlkit
|
|
|
|
, typing-extensions
|
2022-10-06 18:32:54 +00:00
|
|
|
, argcomplete
|
2022-01-26 04:04:25 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "commitizen";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "2.35.0";
|
2022-01-26 04:04:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "commitizen-tools";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-06 18:32:54 +00:00
|
|
|
hash = "sha256-9ek6m5k01sGVHwqWXjWYDsPmIeAgK+H23D9sF5hjrf0=";
|
2022-01-27 00:19:43 +00:00
|
|
|
deepClone = true;
|
2022-01-26 04:04:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ poetry ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
termcolor
|
|
|
|
questionary
|
|
|
|
colorama
|
|
|
|
decli
|
|
|
|
tomlkit
|
|
|
|
jinja2
|
|
|
|
pyyaml
|
2022-10-06 18:32:54 +00:00
|
|
|
argcomplete
|
2022-01-26 04:04:25 +00:00
|
|
|
typing-extensions
|
2022-01-27 00:19:43 +00:00
|
|
|
packaging
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-freezegun
|
|
|
|
pytest-mock
|
|
|
|
pytest-regressions
|
2022-10-06 18:32:54 +00:00
|
|
|
argcomplete
|
2022-01-27 00:19:43 +00:00
|
|
|
git
|
|
|
|
];
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
# 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-27 00:19:43 +00:00
|
|
|
disabledTests = [
|
2022-10-06 18:32:54 +00:00
|
|
|
"test_bump_minor_increment_signed"
|
|
|
|
"test_bump_minor_increment_signed_config_file"
|
2022-01-27 00:19:43 +00:00
|
|
|
"test_bump_on_git_with_hooks_no_verify_enabled"
|
2022-10-06 18:32:54 +00:00
|
|
|
"test_bump_on_git_with_hooks_no_verify_disabled"
|
2022-08-12 12:06:08 +00:00
|
|
|
"test_bump_pre_commit_changelog"
|
|
|
|
"test_bump_pre_commit_changelog_fails_always"
|
2022-01-27 00:19:43 +00:00
|
|
|
"test_get_commits_with_signature"
|
2022-01-26 04:04:25 +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";
|
|
|
|
license = licenses.mit;
|
2022-10-06 18:32:54 +00:00
|
|
|
maintainers = with maintainers; [ lovesegfault anthonyroussel ];
|
2022-01-26 04:04:25 +00:00
|
|
|
};
|
|
|
|
}
|