summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/bump-my-version/default.nix
blob: 2b17dae578a3d165ae1e99935795c42f45b783d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build system
  hatchling,
  hatch-vcs,

  # dependencies
  click,
  httpx,
  pydantic,
  pydantic-settings,
  questionary,
  rich-click,
  rich,
  tomlkit,
  wcmatch,

  # test
  mercurial,
  gitMinimal,
  freezegun,
  pytest-cov-stub,
  pytest-localserver,
  pytest-mock,
  pytestCheckHook,
  versionCheckHook,
}:

buildPythonPackage rec {
  pname = "bump-my-version";
  version = "1.2.6";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "callowayproject";
    repo = "bump-my-version";
    tag = version;
    hash = "sha256-/YaaVWddBAQlDvHqsDfYd5Dv+2VLkFrtuTfCGih4XBo=";
  };

  build-system = [
    hatchling
    hatch-vcs
  ];

  dependencies = [
    click
    httpx
    pydantic
    pydantic-settings
    questionary
    rich-click
    rich
    tomlkit
    wcmatch
  ];

  env = {
    GIT_AUTHOR_NAME = "test";
    GIT_COMMITTER_NAME = "test";
    GIT_AUTHOR_EMAIL = "test@example.com";
    GIT_COMMITTER_EMAIL = "test@example.com";
  };

  nativeCheckInputs = [
    mercurial
    gitMinimal
    freezegun
    pytest-cov-stub
    pytest-localserver
    pytest-mock
    pytestCheckHook
    versionCheckHook
  ];

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [ "bumpversion" ];

  meta = {
    description = "Small command line tool to update version";
    longDescription = ''
      This is a maintained refactor of the bump2version fork of the
      excellent bumpversion project. This is a small command line tool to
      simplify releasing software by updating all version strings in your source code
      by the correct increment and optionally commit and tag the changes.
    '';
    homepage = "https://github.com/callowayproject/bump-my-version";
    changelog = "https://github.com/callowayproject/bump-my-version/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ daspk04 ];
    mainProgram = "bump-my-version";
  };
}