2021-03-10 09:09:35 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pathspec
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
2021-03-31 12:55:06 +01:00
|
|
|
, stdenv
|
2021-03-10 09:09:35 +00:00
|
|
|
}:
|
2017-07-15 08:07:43 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yamllint";
|
2021-03-31 12:55:06 +01:00
|
|
|
version = "1.26.0";
|
2021-03-10 09:09:35 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2017-07-15 08:07:43 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-31 12:55:06 +01:00
|
|
|
sha256 = "11qhs1jk9pwvyk5k3q5blh9sq42dh1ywdf1f3i2zixf7hncwir5h";
|
2017-07-15 08:07:43 +01:00
|
|
|
};
|
|
|
|
|
2021-03-10 09:09:35 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
pathspec
|
|
|
|
];
|
2017-07-15 08:07:43 +01:00
|
|
|
|
2021-03-10 09:09:35 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2017-09-06 17:42:35 +01:00
|
|
|
|
2021-03-10 09:09:35 +00:00
|
|
|
disabledTests = [
|
2021-03-31 12:55:06 +01:00
|
|
|
# test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373
|
2021-03-10 09:09:35 +00:00
|
|
|
"test_find_files_recursively"
|
2021-03-31 12:55:06 +01: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-10 09:09:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "yamllint" ];
|
2017-07-15 08:07:43 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-07-15 08:07:43 +01:00
|
|
|
description = "A linter for YAML files";
|
2020-04-07 11:45:49 +01:00
|
|
|
homepage = "https://github.com/adrienverge/yamllint";
|
2021-03-10 09:09:35 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-07-13 18:49:32 +01:00
|
|
|
maintainers = with maintainers; [ jonringer mikefaille ];
|
2017-07-15 08:07:43 +01:00
|
|
|
};
|
|
|
|
}
|