Http Utils

http_binary

http_binary(name, build_file, build_file_content, integrity, output, repo_mapping, sha256, url)

This rule works like http_file, but for binaries.

http_binary(
    name = "mylang",
    url = "https://mylang.org/download/mylang-linux",
    sha256 =  "f34999afc0dc3fdccba42b4adbdb9767ce32093c24be93c6dfcbb5edbb364787",
)

Use the binary target as @mylang//mylang-linux.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this repository. Name required
build_file Label to BUILD file Label optional None
build_file_content Content of BUILD file String optional ””
integrity Integrity String optional ””
output Name of the output target By default, the rule tries to guess the name of the file by stripping the basename from the URL.

starlark http_binary(     name = “mylang”,     output = “linux-bin”,     url = “https://mylang.org/download/mylang-linux”,     sha256 =  “f34999afc0dc3fdccba42b4adbdb9767ce32093c24be93c6dfcbb5edbb364787”, ) 


Use target: @mylang//linux-bin
String optional ””
repo_mapping A dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<p>For example, an entry ”@foo”: “@bar” declares that, for any time this repository depends on @foo (such as a dependency on @foo//some:target, it should actually resolve that dependency within globally-declared @bar (@bar//some:target). Dictionary: String -> String required
sha256 SHA 256 hash String optional ””
url Url to fetch binary from String required