depot/third_party/nixpkgs/pkgs/development/python-modules/yamllint/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

60 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pathspec,
pytestCheckHook,
pythonOlder,
pyyaml,
}:
buildPythonPackage rec {
pname = "yamllint";
version = "1.35.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "adrienverge";
repo = "yamllint";
rev = "refs/tags/v${version}";
hash = "sha256-+7Q2cPl4XElI2IfLAkteifFVTrGkj2IjZk7nPuc6eYM=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
pyyaml
pathspec
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests =
[
# test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373
"test_find_files_recursively"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# locale tests are broken on BSDs; see https://github.com/adrienverge/yamllint/issues/307
"test_locale_accents"
"test_locale_case"
"test_run_with_locale"
];
pythonImportsCheck = [ "yamllint" ];
meta = with lib; {
description = "Linter for YAML files";
mainProgram = "yamllint";
homepage = "https://github.com/adrienverge/yamllint";
changelog = "https://github.com/adrienverge/yamllint/blob/v${version}/CHANGELOG.rst";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
mikefaille
];
};
}