let render ~run_program ~host ~install_tools_path tool =
let path =
install_tools_path // Tool_def.to_directory_name tool.tool_definition in
let ensure =
generic_installation
?unarchived_directory:tool.unarchived_directory
~archive_is_directory:tool.archive_is_directory
~run_program ~host
~install_path:path
~install_program:(tool.install_program ~path)
~witness:(tool.witness ~host ~path)
~url:tool.url
(tool.tool_definition.Tool_def.name)
in
Machine.Tool.create tool.tool_definition ~ensure
~init:(tool.init_program path)