Skip to content

Transitive inputs "not in registry" #5790

Open
@NobbZ

Description

@NobbZ

Describe the bug

I want to use follows on the input of an input.

Though I get an error, that this is not in the registry.

Steps To Reproduce

  1. Add an arbitrary nixpkgs input to a flake.nix.
  2. Add the following to your flake.nix at appropriate location:
    inputs.rnix-lsp.url = "github:nix-community/rnix-lsp/master";
    inputs.rnix-lsp.inputs.nixpkgs.follows = "nixpkgs";
    inputs.rnix-lsp.inputs.naersk.inputs.nixpkgs.follows = "nixpkgs";
  3. Update the flake.lock and observe error:
    error: cannot find flake 'flake:naersk' in the flake registries
    (use '--show-trace' to show detailed location information)
    

Expected behavior

The nixpkgs input of the naersk input of rnix-lsp is properly overwritten and follows "my" nixpkgs.

nix-env --version output

$ nix-env --version
nix-env (Nix) 2.6.0pre20211214_18e4851

Additional context

I tried this as a way to workaround #5609.

The same problem happens on 2.4 and 2.5:

$ nix shell github:nixos/nix/2.4 -c nix flake metadata
warning: Git tree '/home/…/Projects/system-config' is dirty
error: cannot find flake 'flake:naersk' in the flake registries
(use '--show-trace' to show detailed location information)
$ nix shell github:nixos/nix/2.5.0 -c nix flake metadata
warning: Git tree '/home/…/Projects/system-config' is dirty
error: cannot find flake 'flake:naersk' in the flake registries
(use '--show-trace' to show detailed location information)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions