2022-04-28 11:43:44 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, dunamai
|
2022-05-02 16:00:22 +02:00
|
|
|
, fetchFromGitHub
|
2022-04-28 11:43:44 +02:00
|
|
|
, jinja2
|
|
|
|
, markupsafe
|
|
|
|
, poetry-core
|
2022-05-02 16:00:22 +02:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-04-28 11:43:44 +02:00
|
|
|
, tomlkit
|
|
|
|
}:
|
2022-05-02 16:00:22 +02:00
|
|
|
|
2022-04-28 11:43:44 +02:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "poetry-dynamic-versioning";
|
2022-05-08 14:21:04 +02:00
|
|
|
version = "0.16.0";
|
2022-04-28 11:43:44 +02:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mtkennerly";
|
|
|
|
repo = pname;
|
2022-05-02 15:37:59 +02:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-05-08 14:21:04 +02:00
|
|
|
hash = "sha256-dLtZSm10OYWLRK4eRo83RczW0zBVAUF0HQXLQbeDJCk=";
|
2022-04-28 11:43:44 +02:00
|
|
|
};
|
|
|
|
|
2022-05-02 16:00:22 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2022-04-28 11:43:44 +02:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dunamai
|
|
|
|
jinja2
|
|
|
|
markupsafe
|
2022-05-02 16:00:22 +02:00
|
|
|
tomlkit
|
2022-04-28 11:43:44 +02:00
|
|
|
];
|
|
|
|
|
2022-05-02 16:00:22 +02:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-04-28 11:43:44 +02:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# these require .git, but leaveDotGit = true doesn't help
|
|
|
|
"test__get_version__defaults"
|
|
|
|
"test__get_version__format_jinja"
|
|
|
|
];
|
|
|
|
|
2022-05-02 16:00:22 +02:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"poetry_dynamic_versioning"
|
|
|
|
];
|
2022-04-28 11:43:44 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Plugin for Poetry to enable dynamic versioning based on VCS tags";
|
|
|
|
homepage = "https://github.com/mtkennerly/poetry-dynamic-versioning";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
|
|
};
|
|
|
|
}
|