{{- define "linux_packages" }}
{{- range $element := .LinuxPackages }}
  {{- if eq $element.Arch "amd64" }}
  on_intel do
  {{- else if eq $element.Arch "arm64" }}
  on_arm do
  {{- end }}
    sha256 "{{ $element.SHA256 }}"
    url "{{ $element.URL.Download }}"{{- include "additional_url_params" $element.URL }}
    {{- if .Binary }}
    binary "{{ .Name }}", target: "{{ .Binary }}"
    {{- end }}
    {{- if .WrappedIn }}
    {{- $wrap := .WrappedIn }}
    {{- range .Binaries }}
    rename "{{ $wrap }}/{{ . }}", "{{ . }}"
    {{- end }}
    {{- end }}
  end
{{- end }}
{{- end }}
