1{
2 lib,
3 buildPythonPackage,
4 click,
5 fetchFromGitHub,
6 maison,
7 pdm-backend,
8 pydantic,
9 pytest-freezegun,
10 pytest-xdist,
11 pytestCheckHook,
12 ruyaml,
13 setuptools,
14 writableTmpDirAsHomeHook,
15}:
16
17buildPythonPackage rec {
18 pname = "yamlfix";
19 version = "1.18.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "lyz-code";
24 repo = "yamlfix";
25 tag = version;
26 hash = "sha256-g2X9fBUS5wbQJbP29V5pWwrQ1+P/Y8euK4Rv7C6r3WM=";
27 };
28
29 build-system = [
30 setuptools
31 pdm-backend
32 ];
33
34 dependencies = [
35 click
36 maison
37 pydantic
38 ruyaml
39 ];
40
41 nativeCheckInputs = [
42 pytest-freezegun
43 pytest-xdist
44 pytestCheckHook
45 writableTmpDirAsHomeHook
46 ];
47
48 pythonImportsCheck = [ "yamlfix" ];
49
50 pytestFlags = [
51 "-Wignore::DeprecationWarning"
52 "-Wignore::ResourceWarning"
53 ];
54
55 meta = {
56 description = "Python YAML formatter that keeps your comments";
57 homepage = "https://github.com/lyz-code/yamlfix";
58 changelog = "https://github.com/lyz-code/yamlfix/blob/${src.tag}/CHANGELOG.md";
59 license = lib.licenses.gpl3Only;
60 maintainers = with lib.maintainers; [ koozz ];
61 mainProgram = "yamlfix";
62 };
63}