17 buildPythonPackage rec {
18 pname = "ansible-lint";
24 inherit pname version;
25 sha256 = "sha256-vgt/KqNozTPaON/I19SybBZuo7bbl3Duq5dTBTMlj44=";
29 substituteInPlace src/ansiblelint/file_utils.py \
30 --replace 'raise RuntimeError("Unable to determine file type for %s" % pathex)' 'return "playbook"'
33 buildInputs = [ python ];
35 propagatedBuildInputs = [ ansible enrich pyyaml rich ruamel-yaml wcmatch ];
37 checkInputs = [ pytestCheckHook pytest-xdist git ];
40 # ansible wants to write to $HOME and crashes if it can't
41 export HOME=$(mktemp -d)
42 export PATH=$PATH:${lib.makeBinPath [ ansible ]}
44 # create a working ansible-lint executable
45 export PATH=$PATH:$PWD/src/ansiblelint
46 ln -rs src/ansiblelint/__main__.py src/ansiblelint/ansible-lint
47 patchShebangs src/ansiblelint/__main__.py
54 # Assertion error with negative numbers; maybe requieres an ansible update?
61 "test_get_yaml_files_umlaut"
62 "test_run_inside_role_dir"
63 "test_role_handler_positive"
66 makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ansible ]}" ];
69 homepage = "https://github.com/ansible-community/ansible-lint";
70 description = "Best practices checker for Ansible";
71 license = licenses.mit;
72 maintainers = with maintainers; [ sengaya SuperSandro2000 ];