at master 1.4 kB view raw
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.37.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.9"; 19 20 src = fetchFromGitHub { 21 owner = "adrienverge"; 22 repo = "yamllint"; 23 tag = "v${version}"; 24 hash = "sha256-CohqiBoQcgvGVP0Bt6U768BY1aIwh59YRsgzJfaDmP0="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ 30 pyyaml 31 pathspec 32 ]; 33 34 nativeCheckInputs = [ pytestCheckHook ]; 35 36 disabledTests = [ 37 # test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373 38 "test_find_files_recursively" 39 # Issue with fixture 40 "test_codec_built_in_equivalent" 41 ] 42 ++ lib.optionals stdenv.hostPlatform.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 = "Linter for YAML files"; 53 homepage = "https://github.com/adrienverge/yamllint"; 54 changelog = "https://github.com/adrienverge/yamllint/blob/${src.tag}/CHANGELOG.rst"; 55 license = licenses.gpl3Plus; 56 maintainers = with maintainers; [ mikefaille ]; 57 mainProgram = "yamllint"; 58 }; 59}