Skip to content

Local registries are ignored when using --override-input #13204

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
rennsax opened this issue May 15, 2025 · 1 comment
Open
2 tasks done

Local registries are ignored when using --override-input #13204

rennsax opened this issue May 15, 2025 · 1 comment
Labels

Comments

@rennsax
Copy link
Member

rennsax commented May 15, 2025

Describe the bug

I usually set the user level flake registry for nixpkgs so I can use --override-input nixpkgs flake:nixpkgs to stick to the same rev of nixpkgs in all projects. However these days Nix is ignoring my user level registry.

Steps To Reproduce

$ nix registry list | grep '^user'
nix registry list | grep '^user'
user   flake:flake-utils path:/nix/store/01x5k4nlxcpyd85nnr0b9gm89rm8ff4x-source?lastModified=1731533236&narHash=sha256-l0KFg5HjrsfsO/JpG%2Br7fRrqm12kzFHyUHqHCVpMMbI%3D&rev=11707dc2f618dd54ca8739b309ec4fc024de578b
user   flake:nix-darwin path:/nix/store/7yzvsk7hx95ff64qpwfgm98jpyy3ycl8-source?lastModified=1746708654&narHash=sha256-GeC99gu5H6%2BAjBXsn5dOhP4/ApuioGCBkufdmEIWPRs%3D&rev=6cb36e8327421c61e5a3bbd08ed63491b616364a
user   flake:nixpkgs path:/nix/store/yhc8a0a2mvbp8fp53l57i3d5cnz735fc-source?lastModified=1746576598&narHash=sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0%3D&rev=b3582c75c7f21ce0b429898980eddbbf05c68e55
$ nix flake lock --override-input nixpkgs flake:nixpkgs --override-input flake-utils flake:flake-utils
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b3582c75c7f21ce0b429898980eddbbf05c68e55?narHash=sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0%3D' (2025-05-07)
  → 'github:NixOS/nixpkgs/2e1da60850ce8159db9654a969c2c683f41c18b5?narHash=sha256-/2jlDI5%2BDfAbxdluamyRsORHueBYUiQh%2BaK/kshSvmE%3D' (2025-05-12)

Expected behavior

flake:nixpkgs should be resolved to b3582c75c7f21ce0b429898980eddbbf05c68e55 so flake.lock should not be modified.

Metadata

nix-env (Nix) 2.28.3

Additional context

#13156 (comment)

Probably related to #13144 (if it is, I'll close this issue)

Checklist


Add 👍 to issues you find important.

@sedlund
Copy link
Member

sedlund commented May 23, 2025

nix registry list
user   flake:nixpkgs-master github:nixos/nixpkgs/master
system flake:nixpkgs path:/nix/store/jy9gf9bzmz2axsjrirbi90mbfdkd8bcc-source
 nix --version
nix (Nix) 2.28.3
 nix flake show github:numtide/treefmt-nix --override-input nixpkgs nixpkgs
error:
       … while updating the lock file of flake 'github:numtide/treefmt-nix/020cb423808365fa3f10ff4cb8c0a25df35065a3?narHash=sha256-XgxghfND8TDypxsMTPU2GQdtBEsHTEc3qWE6RVEk8O0%3D'

       … while updating the flake input 'nixpkgs'

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

lix works as expected

lix --version
nix (Lix, like Nix) 2.91.1
lix flake show github:numtide/treefmt-nix --override-input nixpkgs nixpkgs
warning: not writing modified lock file of flake 'github:numtide/treefmt-nix':
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/507b63021ada5fee621b6ca371c4fca9ca46f52c' (2025-04-23)
  → 'path:/nix/store/jy9gf9bzmz2axsjrirbi90mbfdkd8bcc-source?lastModified=0&narHash=sha256-618RRHMo5zgmLkLf5ZQqb2ObrOkWVQzr6L1ritQxoJ0%3D' (1970-01-01)
github:numtide/treefmt-nix/020cb423808365fa3f10ff4cb8c0a25df35065a3
├───checks
│   ├───aarch64-darwin
│   │   ├───empty-config omitted (use '--all-systems' to show)
│   │   ├───examples omitted (use '--all-systems' to show)
│   │   ├───formatter-actionlint omitted (use '--all-systems' to show)
│   │   ├───formatter-alejandra omitted (use '--all-systems' to sho
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants