Skip to content

build.zig dependencies: support url mirrors #14291

Open
@andrewrk

Description

@andrewrk

Extracted from #14265.

.{
    .name = "libffmpeg",
    .version = "5.1.2",
    .dependencies = .{
        .libz = .{
            .url = .{
                "https://github.com/andrewrk/libz/archive/f0e53cc2391741034b144a2c2076ed8a9937b29b.tar.gz",
                "https://andrewkelley.me/temp/backup (2).tar.gz",
            },
            .hash = "sha256=c9b30cffc40999d2c078ff350cbcee642970a224fe123c756d0892f876cf1aae",
        },
    },
}

Note that the hash is the same regardless of which mirror URL is used.

URL mirrors are tried in succession; if one mirror fails to deliver a directory of files with a matching hash, then the next URL is tried, and so on until all the mirrors have been tried.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    Status

    Fetching

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions