Skip to content

--override-input nixpkgs ?rev=abcdef does not override the rev #12138

Open
@roberth

Description

Describe the bug

The syntax --override-input foo ?rev=abcdef does not override the rev.
It appears to set the foo input to .

Steps To Reproduce

$ mkdir empty
$ cd empty
$ nix build github:edolstra/dwarffs --override-input nixpkgs ?rev=3df3c47c19dc90fec35359e89ffb52b34d2b0e94
error:
       … while updating the lock file of flake 'github:edolstra/dwarffs/09f5b6d21ce35fc1de2fd338faa89d0618534ef1?narHash=sha256-Flmc3JZFH6pehFZV3FPmwpQtiByWgbdv6INV0LmSb0M%3D'

       … while updating the flake input 'nixpkgs'

       error: path '/nix/store/0ccnxa25whszw7mgbgyzdm4nqc0zwnm8-source/flake.nix' does not exist

Expected behavior

A build with the specified input revision.

Metadata

nix-2.26.0pre20250106_daab4d1

Additional context

Checklist


Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    bugfetchingNetworking with the outside (non-Nix) world, input lockingflakesnew-cliRelating to the "nix" command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions