1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, setuptools 5, pathspec 6, pytestCheckHook 7, pythonOlder 8, pyyaml 9, stdenv 10}: 11 12buildPythonPackage rec { 13 pname = "yamllint"; 14 version = "1.32.0"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "adrienverge"; 21 repo = pname; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-DtIQ/gUBFQBm0OOJC2c/ONn2ZKsMAzdwMx7FbUo+uIU="; 24 }; 25 26 nativeBuildInputs = [ 27 setuptools 28 ]; 29 30 propagatedBuildInputs = [ 31 pyyaml 32 pathspec 33 ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 ]; 38 39 disabledTests = [ 40 # test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373 41 "test_find_files_recursively" 42 ] ++ lib.optionals stdenv.isDarwin [ 43 # locale tests are broken on BSDs; see https://github.com/adrienverge/yamllint/issues/307 44 "test_locale_accents" 45 "test_locale_case" 46 "test_run_with_locale" 47 ]; 48 49 pythonImportsCheck = [ "yamllint" ]; 50 51 meta = with lib; { 52 description = "A linter for YAML files"; 53 homepage = "https://github.com/adrienverge/yamllint"; 54 changelog = "https://github.com/adrienverge/yamllint/blob/v${version}/CHANGELOG.rst"; 55 license = licenses.gpl3Plus; 56 maintainers = with maintainers; [ jonringer mikefaille ]; 57 }; 58}