Skip to content

Regression: Edit command broken without --impure #10369

@tobim

Description

@tobim

Describe the bug

On Nix 2.21 nix edit returns an unhelpful error message when it should just work. It does work with the --impure flag, but I don't see a reason why adding that to the invocation should be necessary when the path to the package definition is derived correctly in printed as part of the error.

The problem does not exist in Nix 2.18.

Steps To Reproduce

> nix edit nixpkgs#nix
error: cannot open '/nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/pkgs/tools/package-management/nix/default.nix' in an editor because it has no physical path

nix-env --version output

nix-env (Nix) 2.21.0

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions