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

Overriding inputs #4

Open
roberth opened this issue Aug 30, 2024 · 2 comments
Open

Overriding inputs #4

roberth opened this issue Aug 30, 2024 · 2 comments

Comments

@roberth
Copy link
Contributor

roberth commented Aug 30, 2024

We have all the info we need in order to override inputs.

I don't know if implementing that would be an ambition of this project, diverging more from flake-compat, but it is feasible to do so.

One possible use case for this, is to split development dependencies in a separate lock file, but when loading those inputs, always override Nixpkgs to be the main Nixpkgs from the main lock file.
Ultimately that is a workaround for NixOS/nix#7730 which aims to make inputs lazier so that we don't have to care about splitting those, but that issue will take time to implement.

@ursi
Copy link
Owner

ursi commented Aug 31, 2024

I would say it's in the scope of this project. What is the API you're envisioning?

@roberth
Copy link
Contributor Author

roberth commented Sep 1, 2024

This could be a new function besides __functor that takes an extra argument representing overrides, similar to what you'd get with --override-input on flakes that are loaded into the Nix CLI. The syntax for this new argument could be reminiscent of flake.nix inputs, and it could contain either sources or already evaluated flakes (ie like a getFlake return value, where outputs has been called, etc).

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

No branches or pull requests

2 participants