2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
git,
|
|
|
|
hatchling,
|
|
|
|
setuptools-scm,
|
2022-05-18 14:49:53 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hatch-vcs";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.4.0";
|
2022-05-18 14:49:53 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "hatch_vcs";
|
|
|
|
inherit version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-CTgQdI/gHbDUUfq88sGsJojK79Iy1O3pZwkLHBsH2fc=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
git
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
disabledTests = [
|
|
|
|
# incompatible with setuptools-scm>=7
|
|
|
|
# https://github.com/ofek/hatch-vcs/issues/8
|
|
|
|
"test_write"
|
2024-06-20 14:57:18 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
# https://github.com/pypa/setuptools_scm/issues/1038, fixed in setuptools_scm@8.1.0
|
|
|
|
"test_basic"
|
|
|
|
"test_root"
|
|
|
|
"test_metadata"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "hatch_vcs" ];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/ofek/hatch-vcs/releases/tag/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Plugin for Hatch that uses your preferred version control system (like Git) to determine project versions";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/ofek/hatch-vcs";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
|
|
};
|
|
|
|
}
|