Files
nixpkgs/pkgs/development/python-modules/hatch-regex-commit/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

46 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
pythonOlder,
}:
buildPythonPackage rec {
pname = "hatch-regex-commit";
version = "0.0.3";
pyproject = true;
disabled = pythonOlder "3.7";
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 ];
};
}