depot/third_party/nixpkgs/pkgs/development/python-modules/yamllint/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

58 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, pathspec
, pytestCheckHook
, pythonOlder
, pyyaml
, stdenv
}:
buildPythonPackage rec {
pname = "yamllint";
version = "1.33.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "adrienverge";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-hWN5PhEAhckp250Dj7h5PpyH/E1jCi38O4VmMYgPtzE=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
pyyaml
pathspec
];
nativeCheckInputs = [
pytestCheckHook
];
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"
];
pythonImportsCheck = [ "yamllint" ];
meta = with lib; {
description = "A linter for YAML files";
homepage = "https://github.com/adrienverge/yamllint";
changelog = "https://github.com/adrienverge/yamllint/blob/v${version}/CHANGELOG.rst";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jonringer mikefaille ];
};
}