depot/third_party/nixpkgs/pkgs/development/python-modules/yamllint/default.nix
Default email 5083ee08a2 Project import generated by Copybara.
GitOrigin-RevId: 10ecda252ce1b3b1d6403caeadbcc8f30d5ab796
2022-09-30 06:47:45 -05:00

48 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pathspec
, pytestCheckHook
, pythonOlder
, pyyaml
, stdenv
}:
buildPythonPackage rec {
pname = "yamllint";
version = "1.28.0";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-nj2N3RbQWDIUxf3/6AbJNECGch8QdDX2i62ZDlqIgms=";
};
propagatedBuildInputs = [
pyyaml
pathspec
];
checkInputs = [
pytestCheckHook
];
disabledTests = [
# test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373
"test_find_files_recursively"
] ++ lib.optional 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";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jonringer mikefaille ];
};
}