2021-03-12 07:09:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, setuptools
|
2021-03-12 07:09:13 +00:00
|
|
|
, 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";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.32.0";
|
|
|
|
format = "pyproject";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "adrienverge";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-DtIQ/gUBFQBm0OOJC2c/ONn2ZKsMAzdwMx7FbUo+uIU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
pathspec
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-12 07:09:13 +00:00
|
|
|
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"
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2021-04-05 15:23:46 +00:00
|
|
|
# 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";
|
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;
|
2020-07-18 16:06:22 +00:00
|
|
|
maintainers = with maintainers; [ jonringer mikefaille ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|