Skip to content

Transitive follows #95

Closed
Closed
@diniamo

Description

@diniamo

Describe the bug

In a structure where flake A depends on B and D, B depends on C, C depends on D, A cannot override D to follow its own version, because that results in an error:

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

See upstream issues for more details: NixOS#5790 NixOS#8325 NixOS#12083

Steps To Reproduce

  1. flake.nix
{
  inputs = {
    gitignore.url = "github:hercules-ci/gitignore.nix";
    lanzaboote = {
      url = "github:nix-community/lanzaboote";
      inputs.pre-commit-hooks-nix.inputs.gitignore.follows = "gitignore";
    };
  };
}
  1. Run nix flake lock

Expected behavior

D follows A's version, and C uses that as well.

Metadata

Compiled from latest Git:

nix (Determinate Nix 3.6.2) 2.29.0

Additional context

Lix fixed this long ago, in case their code would be helpful.

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions