diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/yamllint/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/yamllint/default.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/yamllint/default.nix b/nixpkgs/pkgs/development/python-modules/yamllint/default.nix new file mode 100644 index 000000000000..9200d7d508ac --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/yamllint/default.nix @@ -0,0 +1,60 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchFromGitHub +, setuptools +, pathspec +, pytestCheckHook +, pythonOlder +, pyyaml +}: + +buildPythonPackage rec { + pname = "yamllint"; + version = "1.35.1"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "adrienverge"; + repo = "yamllint"; + rev = "refs/tags/v${version}"; + hash = "sha256-+7Q2cPl4XElI2IfLAkteifFVTrGkj2IjZk7nPuc6eYM="; + }; + + 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 ]; + }; +} |