Skip to content
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

nix-shell for contentAddressedByDefault = true; sets seemingly incorrect $out value #5309

Open
trofi opened this issue Sep 30, 2021 · 1 comment
Assignees
Labels
bug ca-derivations Derivations with content addressed outputs stale

Comments

@trofi
Copy link
Contributor

trofi commented Sep 30, 2021

Tried to create a shell to debug package SIGSEGV and found I can't run install phase for it:

# good:
$ NIX_BUILD_SHELL=$(which bash) nix-shell -A hello
[nix-shell:~/nm]$ echo $out
/nix/store/d916b1dpw6k0207a9ll0x48bdpas0zmz-hello-2.10

# bad:
$ NIX_BUILD_SHELL=$(which bash) nix-shell --arg config '{ contentAddressedByDefault = true; }' -A hello
[nix-shell:~/nm]$ echo $out
/1rz4g4znpzjwh1xymhjpm42vipw92pr73vdgl6xs1hycac8kf2n9

Looks unintentional.

Cc @regnat

nix-env --version output

nix-env (Nix) 2.4pre20210922_bcd73eb

@trofi trofi added the bug label Sep 30, 2021
@edolstra edolstra added the ca-derivations Derivations with content addressed outputs label Oct 1, 2021
@apo-llonx
Copy link

apo-llonx commented Nov 15, 2021

I'm facing same symptoms while using nix (Nix) 2.5pre20211007_844dd90 and trying to build NixOS configuration flake. In case example cases could provide any helpful hints, different files that were reported while halting the builds were a custom kernel config, and one of etc files of iproute2 package. The tracebacks looked very similar and both started around the fileContents function from nixpkgs/lib/strings.nix.

@stale stale bot added the stale label Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ca-derivations Derivations with content addressed outputs stale
Projects
None yet
Development

No branches or pull requests

4 participants