depot/third_party/nixpkgs/pkgs/development/python-modules/yamllint/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

51 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pathspec
, pytestCheckHook
, pythonOlder
, pyyaml
, stdenv
}:
buildPythonPackage rec {
pname = "yamllint";
version = "1.31.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-LYPx0S9zPhYqh+BrF2FJ17ucW65Knl/OHHcdf3A/emU=";
};
propagatedBuildInputs = [
pyyaml
pathspec
];
nativeCheckInputs = [
pytestCheckHook
];
disabledTests = [
# test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373
"test_find_files_recursively"
] ++ lib.optionals stdenv.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 = "A linter for YAML files";
homepage = "https://github.com/adrienverge/yamllint";
changelog = "https://github.com/adrienverge/yamllint/blob/v${version}/CHANGELOG.rst";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jonringer mikefaille ];
};
}