7 python3.pkgs.buildPythonApplication rec {
8 pname = "ansible-lint";
14 pname = "ansible_lint";
15 hash = "sha256-fP9sWvEO+Za3xgEMvUjJFZJ2SuCY8rBUCHJomaEGan8=";
19 # it is fine if lint tools are missing
20 substituteInPlace conftest.py \
21 --replace "sys.exit(1)" ""
24 nativeBuildInputs = with python3.pkgs; [
33 propagatedBuildInputs = with python3.pkgs; [
34 # https://github.com/ansible/ansible-lint/blob/master/.config/requirements.in
50 # tests can't be easily run without installing things from ansible-galaxy
53 nativeCheckInputs = with python3.pkgs; [
60 # ansible wants to write to $HOME and crashes if it can't
61 export HOME=$(mktemp -d)
62 export PATH=$PATH:${lib.makeBinPath [ ansible ]}
64 # create a working ansible-lint executable
65 export PATH=$PATH:$PWD/src/ansiblelint
66 ln -rs src/ansiblelint/__main__.py src/ansiblelint/ansible-lint
67 patchShebangs src/ansiblelint/__main__.py
69 # create symlink like in the git repo so test_included_tasks does not fail
70 ln -s ../roles examples/playbooks/roles
75 "test_cli_auto_detect"
76 "test_install_collection"
79 "test_require_collection_wrong_version"
80 # re-execs ansible-lint which does not works correct
82 "test_run_inside_role_dir"
83 "test_run_multiple_role_path_no_trailing_slash"
84 "test_runner_exclude_globs"
85 "test_discover_lintables_umlaut"
88 makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ansible ]}" ];
91 description = "Best practices checker for Ansible";
92 mainProgram = "ansible-lint";
93 homepage = "https://github.com/ansible/ansible-lint";
94 changelog = "https://github.com/ansible/ansible-lint/releases/tag/v${version}";
95 license = licenses.mit;
96 maintainers = with maintainers; [ sengaya ];