2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
click,
|
|
|
|
fetchFromGitHub,
|
|
|
|
maison,
|
|
|
|
pdm-backend,
|
|
|
|
pytest-freezegun,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
ruyaml,
|
|
|
|
setuptools,
|
2021-12-30 13:39:12 +00:00
|
|
|
}:
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yamlfix";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.16.0";
|
|
|
|
pyproject = true;
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lyz-code";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "yamlfix";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-nadyBIzXHbWm0QvympRaYU38tuPJ3TPJg8EbvVv+4L0=";
|
2021-12-24 04:21:11 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
2023-02-02 18:25:31 +00:00
|
|
|
setuptools
|
2024-01-25 14:12:00 +00:00
|
|
|
pdm-backend
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2021-12-30 13:39:12 +00:00
|
|
|
click
|
2023-02-02 18:25:31 +00:00
|
|
|
maison
|
2021-12-30 13:39:12 +00:00
|
|
|
ruyaml
|
|
|
|
];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-01-25 14:12:00 +00:00
|
|
|
pytest-freezegun
|
2021-12-30 13:39:12 +00:00
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "yamlfix" ];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
2024-01-25 14:12:00 +00:00
|
|
|
];
|
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
meta = with lib; {
|
2021-12-30 13:39:12 +00:00
|
|
|
description = "Python YAML formatter that keeps your comments";
|
2021-12-24 04:21:11 +00:00
|
|
|
homepage = "https://github.com/lyz-code/yamlfix";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/lyz-code/yamlfix/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.gpl3Only;
|
2021-12-24 04:21:11 +00:00
|
|
|
maintainers = with maintainers; [ koozz ];
|
|
|
|
};
|
|
|
|
}
|