-
-
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
IFD in pure eval mode doesn't allow access to dependencies. #11683
Labels
Comments
Interestingly, it works fine if the store path is already realized...
|
Huh. nix 2.19 is apparently exempt. Versions both before and after suffer from the problem, though: $ for v in 2_24 2_23 2_22 2_21 2_20 2_19 2_18 2_17; do echo -n Version $v:; nix run nixpkgs-unstable\#nixVersions.nix_$v -- eval --expr 'let pkgs = (builtins.getFlake "github:nixos/nixpkgs/5633bcff0c6162b9e4b5f1264264611e950c8ec7").legacyPackages.x86_64-linux; bar = pkgs.writeText "bar" "contents-'"$v"'"; baz = pkgs.runCommand "baz" {} "mkdir $out; ln -s ${bar} $out/bar"; in builtins.readFile "${baz}/bar"' 2>/dev/null || echo failure;done
Version 2_24:failure
Version 2_23:failure
Version 2_22:failure
Version 2_21:failure
Version 2_20:failure
Version 2_19:"contents-2_19"
Version 2_18:failure
Version 2_17:failure |
Within that window between |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using IFD in pure eval mode, you can read files from the output of the derivation in string context, but not its dependencies.
Steps To Reproduce
Expected behavior
Nix should be able to follow the symlink to the package's dependency and read the target file without issue.
nix-env --version
outputNote: Checked with nix 2.24.8, still an issue.
Additional context
Stumbled on this when debugging why another user's flake-based devshell needed
--impure
. It was setting this:Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: