code: def render_source(output_dir, package_spec):
    
    path, name = package_spec.filepath
    module_prefix = "SwiftNav.SBP"
    module_name = camel_case(name)
    full_module_name = ".".join([module_prefix, module_name])
    destination_filename = "%s/src/SwiftNav/SBP/%s.hs" % (output_dir, module_name)
    py_template = JENV.get_template(MESSAGES_TEMPLATE_NAME)
    module_includes = [".".join([module_prefix] + [camel_case(j) for j in i.split(".")[:-1]])
                       for i in package_spec.includes]
  
    with open(destination_filename, 'w') as f:
      f.write(py_template.render(msgs=package_spec.definitions,
                                 description=package_spec.description,
                                 module_name=full_module_name,
                                 module_includes=module_includes))
docs: Render and output to a directory given a package specification.