2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
pathspec,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
2021-03-12 07:09:13 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yamllint";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.35.1";
|
|
|
|
pyproject = true;
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "adrienverge";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "yamllint";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-+7Q2cPl4XElI2IfLAkteifFVTrGkj2IjZk7nPuc6eYM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
pathspec
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
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"
|
|
|
|
];
|
2021-03-12 07:09:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "yamllint" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Linter for YAML files";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "yamllint";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/adrienverge/yamllint";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/adrienverge/yamllint/blob/v${version}/CHANGELOG.rst";
|
2021-03-12 07:09:13 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
mikefaille
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|