2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchPypi,
|
|
|
|
importlib-metadata,
|
|
|
|
packaging,
|
|
|
|
tomli,
|
|
|
|
pytestCheckHook,
|
|
|
|
build,
|
|
|
|
hatchling,
|
|
|
|
pydantic,
|
|
|
|
pytest-mock,
|
|
|
|
setuptools,
|
|
|
|
git,
|
|
|
|
mercurial,
|
2022-10-06 18:32:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "versioningit";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "3.1.0";
|
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-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-eqxxPDGlPrNnprvC6LPejMK4bRDUXFEBr9ZRRGyxD9c=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tox.ini \
|
|
|
|
--replace "--cov=versioningit" "" \
|
|
|
|
--replace "--cov-config=tox.ini" "" \
|
|
|
|
--replace "--no-cov-on-fail" ""
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|