load("@bzlparty_tools//lib:defs.bzl", "...")
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.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 |
jql_test(name, srcs)
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| srcs | - | List of labels | required |
diff(name, source, target, input)
Create a patch file from source and target files.
PARAMETERS
host_platform(ctx)
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| ctx | - |
none |
is_amd64(platform)
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| platform | - |
none |
is_darwin(platform)
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| platform | - |
none |
is_freebsd(platform)
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| platform | - |
none |
is_netbsd(platform)
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| platform | - |
none |
is_windows(platform)
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| platform | - |
none |
platform_binaries(name, url, platforms, darwin_ext, windows_ext, linux_ext, binary, prefix,
platforms_map)
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| name | - |
none |
| url | - |
none |
| platforms | - |
none |
| darwin_ext | - |
“tar.gz” |
| windows_ext | - |
“zip” |
| linux_ext | - |
“tar.gz” |
| binary | - |
None |
| prefix | - |
”” |
| platforms_map | - |
{} |
platform_binary(name, url, binary, platform, algo)
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| name | - |
none |
| url | - |
none |
| binary | - |
none |
| platform | - |
none |
| algo | - |
“384” |