1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools, 7 pathspec, 8 pytestCheckHook, 9 pythonOlder, 10 pyyaml, 11}: 12 13buildPythonPackage rec { 14 pname = "yamllint"; 15 version = "1.35.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "adrienverge"; 22 repo = "yamllint"; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-+7Q2cPl4XElI2IfLAkteifFVTrGkj2IjZk7nPuc6eYM="; 25 }; 26 27 nativeBuildInputs = [ setuptools ]; 28 29 propagatedBuildInputs = [ 30 pyyaml 31 pathspec 32 ]; 33 34 nativeCheckInputs = [ pytestCheckHook ]; 35 36 disabledTests = 37 [ 38 # test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373 39 "test_find_files_recursively" 40 ] 41 ++ lib.optionals stdenv.isDarwin [ 42 # locale tests are broken on BSDs; see https://github.com/adrienverge/yamllint/issues/307 43 "test_locale_accents" 44 "test_locale_case" 45 "test_run_with_locale" 46 ]; 47 48 pythonImportsCheck = [ "yamllint" ]; 49 50 meta = with lib; { 51 description = "A linter for YAML files"; 52 mainProgram = "yamllint"; 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; [ 57 jonringer 58 mikefaille 59 ]; 60 }; 61}