Merge branch 'fix-unrecognized-archive-format' of https://github.com/NobbZ/nix

This commit is contained in:
Eelco Dolstra 2022-05-12 11:24:51 +02:00
commit d354fc30b9
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -267,8 +267,8 @@ struct GitHubInputScheme : GitArchiveInputScheme
auto host = maybeGetStrAttr(input.attrs, "host").value_or("github.com");
auto url = fmt(
host == "github.com"
? "https://api.%s/repos/%s/%s/commits/%s"
: "https://%s/api/v3/repos/%s/%s/commits/%s",
? "https://api.%s/repos/%s/%s/tarball/%s"
: "https://%s/api/v3/repos/%s/%s/tarball/%s",
host, getStrAttr(input.attrs, "owner"), getStrAttr(input.attrs, "repo"),
input.getRev()->to_string(Base16, false));