Skip to content

nix-shell complains about nixos channel being a symlink #12847

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

Open
2 tasks done
leona-ya opened this issue Apr 1, 2025 · 1 comment
Open
2 tasks done

nix-shell complains about nixos channel being a symlink #12847

leona-ya opened this issue Apr 1, 2025 · 1 comment
Labels
bug regression Something doesn't work anymore

Comments

@leona-ya
Copy link
Member

leona-ya commented Apr 1, 2025

Describe the bug

We have a custom nixos channel which contains nixpkgs as a subfolder among others. -> We have /nix/var/nix/profiles/per-user/root/channels/ as a symlink to the nixos subfolder of a store folder. (e.g. /nix/store/49qpgqzyvk0r87mi1g6j376ardmzkvkq-nixos/nixos)

nix-shell <nixpkgs> -A hello now fails with

error: path '/nix/var/nix/profiles/per-user/root/channels/nixos' is a symlink

Steps To Reproduce

  • Use /nix/store/iidn0ph0jfcfqsmxmdxxczxa85wxrfqd-release-24.11.5308.2542d813/tarballs/nixexprs.tar.xz as channel (download from s3.whq.fcio.net/hydra)
  • run the above command

Expected behavior

A valid nix-shell spawns.

Metadata

nix-env (Nix) 2.25.2

Additional context

I didn't found a release note about this since 2.18 (the last version we tested with which it worked)

Checklist


Add 👍 to issues you find important.

@leona-ya leona-ya added bug regression Something doesn't work anymore labels Apr 1, 2025
@leona-ya
Copy link
Member Author

leona-ya commented Apr 1, 2025

Interestingly, this works on 2.26 (even though I didn't find anything in the release notes). But it's quite slow because it

unpacking 'https://github.com/NixOS/nixpkgs/archive/573c650e8a14b2faa0041645ab18aed7e60f0c9a.tar.gz' into the Git cache...

and i'm really unsure why it does that, because the necessary files should already be on the machine? (probably not in the git cache tho).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug regression Something doesn't work anymore
Projects
None yet
Development

No branches or pull requests

1 participant