Open lf- opened 9 months ago
Particularly inconvenient when debugging a network issue with a tool you know is in the store but you can't use nix shell nixpkgs#...
, even with nixpkgs pinned, because it wants to fetch the registry first.
FYI this bug is fixed in https://lix.systems because we simply vendored the flake registry.
FYI this bug is fixed in https://lix.systems because we simply vendored the flake registry.
It definitely seems sensible to allow pinning the registries list itself, along with the individual pins.
Actually you can do that today if you want, set flake-registry
to a path to a download of the json file from https://github.com/nixos/flake-registry in nix.conf, and it will just work IIRC! When we vendored it, the patch was totally trivial because basically all that support already exists in CppNix. Or you can set it to empty string and it will disable the online registry.
The real boon of Lix's strategy is it's fixed by default and so we can honestly call this bug fixed in Lix despite barely changing the code because un-fixing it requires re-enabling the online flake registry fetch functionality that we simultaneously deprecated.
Actually you can do that today if you want, set
flake-registry
to a path to a download of the json file from https://github.com/nixos/flake-registry in nix.conf, and it will just work IIRC!
Perfect! This is 👌 and should absolutely be the default. One fewer round trip! And no network calls at all for packages in the store. Very nice, thank you.
Describe the bug
This is arguably in some respects the same bug as #7075 but only takes ${timeToCompleteHttpRequest}.
Given the following setup, nix will refetch the global registry when building things from non-fully-qualified flake reference:
Steps To Reproduce
nix run --debug nixpkgs#hello
Expected behavior
Nix should not refetch the registry if it can resolve the flake reference entirely locally.
nix-env --version
output~ » nix-env --version nix-env (Nix) 2.17.0
Additional context
Priorities
Add :+1: to issues you find important.