depot/third_party/nixpkgs/pkgs/development/python-modules/yamlfix/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

66 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
click,
fetchFromGitHub,
maison,
pdm-backend,
pytest-freezegun,
pytest-xdist,
pytest,
pytestCheckHook,
pythonOlder,
ruyaml,
setuptools,
}:
buildPythonPackage rec {
pname = "yamlfix";
version = "1.16.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "lyz-code";
repo = "yamlfix";
rev = "refs/tags/${version}";
hash = "sha256-nadyBIzXHbWm0QvympRaYU38tuPJ3TPJg8EbvVv+4L0=";
};
build-system = [
setuptools
pdm-backend
];
dependencies = [
click
maison
ruyaml
];
nativeCheckInputs = [
pytest-freezegun
pytest-xdist
pytestCheckHook
];
preCheck = ''
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [ "yamlfix" ];
pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];
meta = with lib; {
description = "Python YAML formatter that keeps your comments";
homepage = "https://github.com/lyz-code/yamlfix";
changelog = "https://github.com/lyz-code/yamlfix/blob/${version}/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with maintainers; [ koozz ];
};
}