2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchPypi,
|
|
|
|
importlib-metadata,
|
|
|
|
packaging,
|
|
|
|
tomli,
|
|
|
|
pytestCheckHook,
|
|
|
|
build,
|
|
|
|
hatchling,
|
|
|
|
pydantic,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest-mock,
|
|
|
|
setuptools,
|
|
|
|
git,
|
|
|
|
mercurial,
|
2022-10-06 18:32:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "versioningit";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "3.1.2";
|
2022-10-06 18:32:54 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-Tbg+2Z9WsH2DlAvuNEXKRsoSDRO2swTNtftE5apO3sA=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs =
|
|
|
|
[ packaging ]
|
|
|
|
++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]
|
|
|
|
++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-06 18:32:54 +00:00
|
|
|
pytestCheckHook
|
|
|
|
build
|
2024-01-13 08:15:51 +00:00
|
|
|
hatchling
|
2022-10-06 18:32:54 +00:00
|
|
|
pydantic
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub
|
2022-10-06 18:32:54 +00:00
|
|
|
pytest-mock
|
2024-04-21 15:54:59 +00:00
|
|
|
setuptools
|
2022-10-06 18:32:54 +00:00
|
|
|
git
|
|
|
|
mercurial
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# wants to write to the Nix store
|
|
|
|
"test_editable_mode"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "versioningit" ];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "setuptools plugin for determining package version from VCS";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "versioningit";
|
2022-10-06 18:32:54 +00:00
|
|
|
homepage = "https://github.com/jwodder/versioningit";
|
|
|
|
changelog = "https://versioningit.readthedocs.io/en/latest/changelog.html";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = licenses.mit;
|
2022-10-06 18:32:54 +00:00
|
|
|
maintainers = with maintainers; [ DeeUnderscore ];
|
|
|
|
};
|
|
|
|
}
|