2021-03-12 07:09:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pathspec
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
2021-04-05 15:23:46 +00:00
|
|
|
, stdenv
|
2021-03-12 07:09:13 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yamllint";
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "1.26.2";
|
2021-03-12 07:09:13 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "sha256-CwipZ1Akj98h8egZPLd4dVTvde1Xsn9iHNazvwmvEaE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
pathspec
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
disabledTests = [
|
2021-04-05 15:23:46 +00:00
|
|
|
# test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373
|
2021-03-12 07:09:13 +00:00
|
|
|
"test_find_files_recursively"
|
2021-04-05 15:23:46 +00:00
|
|
|
] ++ 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"
|
2021-03-12 07:09:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "yamllint" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A linter for YAML files";
|
|
|
|
homepage = "https://github.com/adrienverge/yamllint";
|
2021-03-12 07:09:13 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-07-18 16:06:22 +00:00
|
|
|
maintainers = with maintainers; [ jonringer mikefaille ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|