Skip to content

Instantly share code, notes, and snippets.

@leo60228
Created May 28, 2026 18:36
Show Gist options
  • Select an option

  • Save leo60228/a5cd77b80269fc2222ce8eeb9923d463 to your computer and use it in GitHub Desktop.

Select an option

Save leo60228/a5cd77b80269fc2222ce8eeb9923d463 to your computer and use it in GitHub Desktop.
self: super:
{
fetchCrate =
{
registryDl ? "https://static.crates.io/crates",
...
}@args:
super.fetchCrate (args // { inherit registryDl; });
rustPlatform = super.rustPlatform.overrideScope (
self': super': {
importCargoLock =
{
extraRegistries ? { },
...
}@args:
super'.importCargoLock (
args
// {
extraRegistries = extraRegistries // {
"https://github.com/rust-lang/crates.io-index" = "https://static.crates.io/crates";
};
}
);
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment