Skip to content

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

@leona-ya

Description

@leona-ya

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugregressionSomething doesn't work anymore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions