1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytestCheckHook
5, pythonOlder
6, git
7, hatchling
8, setuptools-scm
9}:
10
11buildPythonPackage rec {
12 pname = "hatch-vcs";
13 version = "0.3.0";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 pname = "hatch_vcs";
20 inherit version;
21 hash = "sha256-zsUQfPzkgsZ/i8lvGLvDIMmqDQaBgOFK0xe77loVP+4=";
22 };
23
24 nativeBuildInputs = [
25 hatchling
26 ];
27
28 propagatedBuildInputs = [
29 hatchling
30 setuptools-scm
31 ];
32
33 nativeCheckInputs = [
34 git
35 pytestCheckHook
36 ];
37
38 disabledTests = [
39 # incompatible with setuptools-scm>=7
40 # https://github.com/ofek/hatch-vcs/issues/8
41 "test_write"
42 ];
43
44 pythonImportsCheck = [
45 "hatch_vcs"
46 ];
47
48 meta = with lib; {
49 description = "A plugin for Hatch that uses your preferred version control system (like Git) to determine project versions";
50 homepage = "https://github.com/ofek/hatch-vcs";
51 license = licenses.mit;
52 maintainers = with maintainers; [ cpcloud ];
53 };
54}