Skip to content
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

Don’t override flake ref if no url or type provided #7176

Closed

Conversation

matthewbauer
Copy link
Member

We have a situation where we want to override an input’s input, but not the input itself. It looks something like:

inputs.a = {
  type = "github";
  owner = "example";
  repo = "a";
  inputs.b.inputs.nixpkgs.follows = "nixpkgs";
};

The problem is that Nix thinks we are overriding "b", when we are really only wanting to override one of "b"’s inputs. The flake url should remain the same, but in the past behavior, Nix assigns "b" to an indirect input, and ignores the "b" from "a"s inputs. We want it to behave more like the "follows" and not treat it as a full override of "b".

We have a situation where we want to override an input’s input, but
not the input itself. It looks something like:

inputs.a = {
  type = "github";
  owner = "example";
  repo = "a";
  inputs.b.inputs.nixpkgs.follows = "nixpkgs";
};

The problem is that Nix thinks we are overriding "b", when we are
really only wanting to override one of "b"’s inputs. The flake url
should remain the same, but with existing behavior, Nix assign "b" to
be an indirect input, and ignores the "b" from "a"s inputs. We want it
to behave more like the "follows" and not treat it as a full override
of "b".
@Kha
Copy link
Contributor

Kha commented Oct 15, 2022

That sounds like #6621. I'm still waiting for #6530 to be merged first.

@matthewbauer
Copy link
Member Author

matthewbauer commented Oct 15, 2022

That sounds like #6621. I'm still waiting for #6530 to be merged first.

Oh wow! I didn’t see that! Yours looks pretty similar to mine but it looks like you have thought through some of the potential issues better. I’m not sure if I understand why it had to be reverted though?

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

Successfully merging this pull request may close these issues.

2 participants