Skip to content

--override-input now ignores user and system registries #13144

@Enzime

Description

@Enzime

Describe the bug

--override-input no longer resolves flakerefs using the user and system registries

Steps To Reproduce

$ nix registry add ln "git+file:///Users/enzime/Code/nixpkgs"
$ nix registry list
user   flake:ln git+file:///Users/enzime/Code/nixpkgs
$ nix build github:NixOS/nix --override-input nixpkgs ln
error:
       … while updating the lock file of flake 'github:NixOS/nix/1e822bd4149a8bce1da81ee2ad9404986b07914c?narHash=sha256-NzORjJ9gAGy5Vc4Dl0QuyAiw6JtUt1vvIX0jAI7BBLE%3D'

       … while updating the flake input 'nixpkgs'

       error: cannot find flake 'flake:ln' in the flake registries
$ nix repl github:NixOS/nix --override-input nixpkgs ln
Nix 2.28.3
Type :? for help.
error:
       … while updating the lock file of flake 'github:NixOS/nix/1e822bd4149a8bce1da81ee2ad9404986b07914c?narHash=sha256-NzORjJ9gAGy5Vc4Dl0QuyAiw6JtUt1vvIX0jAI7BBLE%3D'

       … while updating the flake input 'nixpkgs'

       error: cannot find flake 'flake:ln' in the flake registries

Expected behavior

I expected ln to be resolved to git+file:///Users/enzime/Code/nixpkgs

Metadata

nix-env (Nix) 2.28.3

Additional context

#12010 #13082

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions