about summary refs log tree commit diff
path: root/pkgs/applications/version-management
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-10-01 00:05:21 +0000
committerGitHub <noreply@github.com>2022-10-01 00:05:21 +0000
commit51e600a3e59d43909b7e6db14e1bba12505ab968 (patch)
tree16a24dee4479c8cea3f15a805491e4e437caa03e /pkgs/applications/version-management
parente1d2f74dee301bf8c755e14909bc27db1da5d895 (diff)
parent3b5295131d4504fa422c45c08c808bf9da656476 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/version-management')
-rw-r--r--pkgs/applications/version-management/commitizen/default.nix92
1 files changed, 21 insertions, 71 deletions
diff --git a/pkgs/applications/version-management/commitizen/default.nix b/pkgs/applications/version-management/commitizen/default.nix
index 017b48367267c..bd5e22dc3c6f0 100644
--- a/pkgs/applications/version-management/commitizen/default.nix
+++ b/pkgs/applications/version-management/commitizen/default.nix
@@ -16,32 +16,18 @@
 , termcolor
 , tomlkit
 , typing-extensions
-, chardet
-
-, argcomplete, fetchPypi
+, argcomplete
 }:
 
-let
-  # NOTE: Upstream requires argcomplete <2, so we make it here.
-  argcomplete_1 = argcomplete.overrideAttrs (old: rec {
-    version = "1.12.3";
-    src = fetchPypi {
-      inherit (old) pname;
-      inherit version;
-      sha256 = "sha256-LH2//YwEXqU0kh5jsL5v5l6IWZmQ2NxAisjFQrcqVEU=";
-    };
-  });
-in
-
 buildPythonApplication rec {
   pname = "commitizen";
-  version = "2.29.2";
+  version = "2.35.0";
 
   src = fetchFromGitHub {
     owner = "commitizen-tools";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-4mK+GA1rfctJkMv4ZMfXE/qih/9fF0kwT6bIcLVB/Bk=";
+    hash = "sha256-9ek6m5k01sGVHwqWXjWYDsPmIeAgK+H23D9sF5hjrf0=";
     deepClone = true;
   };
 
@@ -50,7 +36,6 @@ buildPythonApplication rec {
   nativeBuildInputs = [ poetry ];
 
   propagatedBuildInputs = [
-    chardet
     termcolor
     questionary
     colorama
@@ -58,82 +43,47 @@ buildPythonApplication rec {
     tomlkit
     jinja2
     pyyaml
-    argcomplete_1
+    argcomplete
     typing-extensions
     packaging
   ];
 
   doCheck = true;
+
   checkInputs = [
     pytestCheckHook
     pytest-freezegun
     pytest-mock
     pytest-regressions
-    argcomplete_1
+    argcomplete
     git
   ];
 
-  # NB: These require full git history
+  # 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
   disabledTests = [
-    "test_breaking_change_content_v1"
-    "test_breaking_change_content_v1_beta"
-    "test_breaking_change_content_v1_multiline"
-    "test_bump_command_increment_option"
-    "test_bump_command_prelease"
-    "test_bump_dry_run"
-    "test_bump_files_only"
-    "test_bump_local_version"
-    "test_bump_major_increment"
-    "test_bump_minor_increment"
-    "test_bump_on_git_with_hooks_no_verify_disabled"
+    "test_bump_minor_increment_signed"
+    "test_bump_minor_increment_signed_config_file"
     "test_bump_on_git_with_hooks_no_verify_enabled"
-    "test_bump_patch_increment"
+    "test_bump_on_git_with_hooks_no_verify_disabled"
     "test_bump_pre_commit_changelog"
     "test_bump_pre_commit_changelog_fails_always"
-    "test_bump_tag_exists_raises_exception"
-    "test_bump_when_bumpping_is_not_support"
-    "test_bump_when_version_inconsistent_in_version_files"
-    "test_bump_with_changelog_arg"
-    "test_bump_with_changelog_config"
-    "test_bump_with_changelog_to_stdout_arg"
-    "test_bump_with_changelog_to_stdout_dry_run_arg"
-    "test_changelog_config_flag_increment"
-    "test_changelog_config_start_rev_option"
-    "test_changelog_from_rev_first_version_from_arg"
-    "test_changelog_from_rev_latest_version_dry_run"
-    "test_changelog_from_rev_latest_version_from_arg"
-    "test_changelog_from_rev_range_version_not_found"
-    "test_changelog_from_rev_single_version_not_found"
-    "test_changelog_from_rev_version_range_from_arg"
-    "test_changelog_from_rev_version_range_including_first_tag"
-    "test_changelog_from_rev_version_with_big_range_from_arg"
-    "test_changelog_from_start"
-    "test_changelog_from_version_zero_point_two"
-    "test_changelog_hook"
-    "test_changelog_incremental_angular_sample"
-    "test_changelog_incremental_keep_a_changelog_sample"
-    "test_changelog_incremental_keep_a_changelog_sample_with_annotated_tag"
-    "test_changelog_incremental_newline_separates_new_content_from_old"
-    "test_changelog_incremental_with_release_candidate_version"
-    "test_changelog_is_persisted_using_incremental"
-    "test_changelog_multiple_incremental_do_not_add_new_lines"
-    "test_changelog_replacing_unreleased_using_incremental"
-    "test_changelog_with_different_cz"
-    "test_changelog_with_filename_as_empty_string"
-    "test_get_commits"
-    "test_get_commits_author_and_email"
     "test_get_commits_with_signature"
-    "test_get_latest_tag_name"
-    "test_invalid_subject_is_skipped"
-    "test_is_staging_clean_when_updating_file"
-    "test_none_increment_should_not_call_git_tag_and_error_code_is_not_zero"
-    "test_prevent_prerelease_when_no_increment_detected"
   ];
 
   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;
-    maintainers = with maintainers; [ lovesegfault ];
+    maintainers = with maintainers; [ lovesegfault anthonyroussel ];
   };
 }