nixpkgs/pkgs/development/python-modules/yamllint/default.nix

49 lines
1.0 KiB
Nix
Raw Normal View History

2021-03-10 09:09:35 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, pathspec
, pytestCheckHook
, pythonOlder
, pyyaml
, stdenv
2021-03-10 09:09:35 +00:00
}:
buildPythonPackage rec {
pname = "yamllint";
version = "1.26.0";
2021-03-10 09:09:35 +00:00
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "11qhs1jk9pwvyk5k3q5blh9sq42dh1ywdf1f3i2zixf7hncwir5h";
};
2021-03-10 09:09:35 +00:00
propagatedBuildInputs = [
pyyaml
pathspec
];
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 = [
# test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373
2021-03-10 09:09:35 +00:00
"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"
2021-03-10 09:09:35 +00:00
];
pythonImportsCheck = [ "yamllint" ];
meta = with lib; {
description = "A linter for YAML files";
homepage = "https://github.com/adrienverge/yamllint";
2021-03-10 09:09:35 +00:00
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jonringer mikefaille ];
};
}