summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/hatch-regex-commit/default.nix
blob: 83453dde3eaa6533d85472402c0d7b0766c0c24f (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
}:

buildPythonPackage rec {
  pname = "hatch-regex-commit";
  version = "0.0.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "frankie567";
    repo = "hatch-regex-commit";
    tag = "v${version}";
    hash = "sha256-E0DIBBaDmTCsZQ41NcjcbzgJ16BwhdexlrGWBdf77oA=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail 'dynamic = ["version"]' 'version = "${version}"' \
      --replace-fail ', "hatch-regex-commit"' "" \
      --replace-fail " --cov-report=term-missing --cov-config=pyproject.toml --cov=hatch_regex_commit --cov=tests" ""
  '';

  build-system = [ hatchling ];

  dependencies = [ hatchling ];

  # Module has no tests
  doCheck = false;

  pythonImportsCheck = [ "hatch_regex_commit" ];

  meta = {
    description = "Hatch plugin to create a commit and tag when bumping version";
    homepage = "https://github.com/frankie567/hatch-regex-commit";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
}