1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build system
7 hatchling,
8 hatch-vcs,
9
10 # dependencies
11 click,
12 httpx,
13 pydantic,
14 pydantic-settings,
15 questionary,
16 rich-click,
17 rich,
18 tomlkit,
19 wcmatch,
20
21 # test
22 mercurial,
23 gitMinimal,
24 freezegun,
25 pytest-cov-stub,
26 pytest-localserver,
27 pytest-mock,
28 pytestCheckHook,
29 versionCheckHook,
30}:
31
32buildPythonPackage rec {
33 pname = "bump-my-version";
34 version = "1.2.3";
35 pyproject = true;
36
37 src = fetchFromGitHub {
38 owner = "callowayproject";
39 repo = "bump-my-version";
40 tag = version;
41 hash = "sha256-0gaRW8gUCC4gVsikGD4is8xGZm+JTWfFQ2QUyau8vZ0=";
42 };
43
44 build-system = [
45 hatchling
46 hatch-vcs
47 ];
48
49 dependencies = [
50 click
51 httpx
52 pydantic
53 pydantic-settings
54 questionary
55 rich-click
56 rich
57 tomlkit
58 wcmatch
59 ];
60
61 env = {
62 GIT_AUTHOR_NAME = "test";
63 GIT_COMMITTER_NAME = "test";
64 GIT_AUTHOR_EMAIL = "test@example.com";
65 GIT_COMMITTER_EMAIL = "test@example.com";
66 };
67
68 nativeCheckInputs = [
69 mercurial
70 gitMinimal
71 freezegun
72 pytest-cov-stub
73 pytest-localserver
74 pytest-mock
75 pytestCheckHook
76 versionCheckHook
77 ];
78
79 versionCheckProgramArg = "--version";
80
81 __darwinAllowLocalNetworking = true;
82
83 pythonImportsCheck = [ "bumpversion" ];
84
85 meta = {
86 description = "Small command line tool to update version";
87 longDescription = ''
88 This is a maintained refactor of the bump2version fork of the
89 excellent bumpversion project. This is a small command line tool to
90 simplify releasing software by updating all version strings in your source code
91 by the correct increment and optionally commit and tag the changes.
92 '';
93 homepage = "https://github.com/callowayproject/bump-my-version";
94 changelog = "https://github.com/callowayproject/bump-my-version/releases/tag/${src.tag}";
95 license = lib.licenses.mit;
96 maintainers = with lib.maintainers; [ daspk04 ];
97 mainProgram = "bump-my-version";
98 };
99}