nix: fix fetching of crates which now require agent overlay

This commit is contained in:
Siddarth Kumar 2026-05-28 16:53:25 +05:30
parent c5d895d164
commit 3cca4e9105
No known key found for this signature in database
GPG Key ID: 599D10112BF518DB

View File

@ -12,7 +12,16 @@
"x86_64-darwin" "aarch64-darwin" "x86_64-darwin" "aarch64-darwin"
]; ];
forAllSystems = nixpkgs.lib.genAttrs stableSystems; forAllSystems = nixpkgs.lib.genAttrs stableSystems;
pkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); # crates.io's WAF returns 403 for the default `curl/X.Y.Z` User-Agent.
fetchurlUserAgentOverlay = final: prev: {
fetchurl = args: prev.fetchurl (args // {
curlOptsList = (args.curlOptsList or []) ++ [ "-A" "logos-storage-nix" ];
});
};
pkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
overlays = [ fetchurlUserAgentOverlay ];
});
in in
{ {
packages = forAllSystems (system: let packages = forAllSystems (system: let