1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Merge pull request #12580 from ysndr/fix/fetchers/host-in-locked-url

Add host attribute of github/gitlab flakerefs to URL serialization
This commit is contained in:
Eelco Dolstra 2025-02-28 15:41:02 +01:00 committed by GitHub
commit d8a7c50495
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -149,6 +149,9 @@ struct GitArchiveInputScheme : InputScheme
};
if (auto narHash = input.getNarHash())
url.query.insert_or_assign("narHash", narHash->to_string(HashFormat::SRI, true));
auto host = maybeGetStrAttr(input.attrs, "host");
if (host)
url.query.insert_or_assign("host", *host);
return url;
}