blob: d4bd72e17ff568765bf9bbf85fdf4f48842f6ffb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{
lib,
buildPythonPackage,
dunamai,
fetchFromGitHub,
jinja2,
poetry-core,
poetry,
pytestCheckHook,
tomlkit,
}:
buildPythonPackage rec {
pname = "poetry-dynamic-versioning";
version = "1.9.1";
pyproject = true;
src = fetchFromGitHub {
owner = "mtkennerly";
repo = "poetry-dynamic-versioning";
tag = "v${version}";
hash = "sha256-SKVx20RrwhCpdDIc2Pu1oFaXWe2d2GnbJGUX7KqMvo0=";
};
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
dunamai
jinja2
tomlkit
];
nativeCheckInputs = [
pytestCheckHook
poetry
];
# virtualenv: error: argument dest: the destination . is not write-able at /
doCheck = false;
disabledTests = [
# these require .git, but leaveDotGit = true doesn't help
"test__get_version__defaults"
"test__get_version__format_jinja"
# these expect to be able to run the poetry cli which fails in test hook
"test_integration"
];
pythonImportsCheck = [ "poetry_dynamic_versioning" ];
setupHook = ./setup-hook.sh;
meta = {
description = "Plugin for Poetry to enable dynamic versioning based on VCS tags";
mainProgram = "poetry-dynamic-versioning";
homepage = "https://github.com/mtkennerly/poetry-dynamic-versioning";
changelog = "https://github.com/mtkennerly/poetry-dynamic-versioning/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cpcloud ];
};
}
|