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 2.21 fails to build flakes when using --store #10267

Closed
ipetkov opened this issue Mar 19, 2024 · 5 comments
Closed

Nix 2.21 fails to build flakes when using --store #10267

ipetkov opened this issue Mar 19, 2024 · 5 comments
Labels

Comments

@ipetkov
Copy link

ipetkov commented Mar 19, 2024

Describe the bug

I have a regression test for a project of mine which builds a flake using a different store path via --store. It suddenly started failing with the 2.21 release, but works with 2.20 just fine.

Steps To Reproduce

git clone https://github.com/ipetkov/crane.git
cd crane/extra-tests/alt-store
# Succeeds
nix run nixpkgs#legacyPackages.x86_64-linux.nixVersions.nix_2_20 \
  -- build .#default \
  --no-write-lock-file \
  --override-input crane ../.. \
  --store $(pwd)/alt-store
# Clean up
sudo rm -rf ./alt-store

# Fails
nix run nixpkgs#legacyPackages.x86_64-linux.nixVersions.nix_2_21 \
  -- build .#default \
  --no-write-lock-file \
  --override-input crane ../.. \
  --store $(pwd)/alt-store

Expected behavior

The flake should build fine with both Nix 2.20 and 2.21

Priorities

Add 👍 to issues you find important.

@ivan-tkatchev
Copy link

ivan-tkatchev commented Mar 19, 2024

Extremely important issue, currently in Nix 2.21 chroot stores do not work at all.
Works correctly for Nix 2.18.2, so the regression was introduced somewhere between these two versions.

@Ericson2314
Copy link
Member

Sounds like #9852

@fricklerhandwerk
Copy link
Contributor

fricklerhandwerk commented Mar 27, 2024

@edolstra
Copy link
Member

I can confirm that this is fixed by #10345.

edolstra added a commit to edolstra/nix that referenced this issue Mar 29, 2024
edolstra added a commit to edolstra/nix that referenced this issue Mar 29, 2024
@github-project-automation github-project-automation bot moved this from To triage to Done in Nix team Apr 3, 2024
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-03-27-nix-team-meeting-134/42961/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

6 participants