-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict builtins.isStorePath #5973
Comments
A naive implementation of this will cause a lot of useless store- and nix-daemon I/O, because NixOS needs a copy of the nixpkgs repo contents to be in the store.
dir:
mkDerivation {
src = builtins.path { name = source; path = pkgs.path + "/${dir}"; };
buildPhase = "<filterIntoStore's logic as a script copying to $out>";
__contentAddressed = true;
} This combination looks to be quite efficient. NixOS can cache its docs generation with few unnecessary rebuilds. |
Related? #5868 |
The use of
builtins.isStorePath
can cause evaluation to diverge between Nix expressions in the Nix store versus those outside, see e.g. NixOS/nixpkgs#153594 (comment). Perhapsbuiltins.isStorePath
should return false for flake source paths, even if they happen to be stored in the Nix store (which is arguably an implementation detail). In fact this will probably happen due to #3121 because we won't copy flakes to the store unless required.The text was updated successfully, but these errors were encountered: