1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonOlder,
7 gitMinimal,
8 hatchling,
9 setuptools-scm,
10}:
11
12buildPythonPackage rec {
13 pname = "hatch-vcs";
14 version = "0.5.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchPypi {
20 pname = "hatch_vcs";
21 inherit version;
22 hash = "sha256-A5X6EmlANAIVCQw0Siv04qd7y+faqxb0Gze5jJWAn/k=";
23 };
24
25 build-system = [ hatchling ];
26
27 dependencies = [
28 hatchling
29 setuptools-scm
30 ];
31
32 nativeCheckInputs = [
33 gitMinimal
34 pytestCheckHook
35 ];
36
37 disabledTests = [
38 # reacts to our setup-hook pretending a version
39 "test_custom_tag_pattern_get_version"
40 ];
41
42 pythonImportsCheck = [ "hatch_vcs" ];
43
44 meta = with lib; {
45 changelog = "https://github.com/ofek/hatch-vcs/releases/tag/v${version}";
46 description = "Plugin for Hatch that uses your preferred version control system (like Git) to determine project versions";
47 homepage = "https://github.com/ofek/hatch-vcs";
48 license = licenses.mit;
49 maintainers = with maintainers; [ cpcloud ];
50 };
51}