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

Compatibility with builtins.getFlake #15

Open
zimbatm opened this issue Jan 1, 2021 · 3 comments
Open

Compatibility with builtins.getFlake #15

zimbatm opened this issue Jan 1, 2021 · 3 comments

Comments

@zimbatm
Copy link
Contributor

zimbatm commented Jan 1, 2021

What do you think if flake-compat was changed to provide the same output as builtins.getFlake? That way, most of the logic can be substituted if the builtin exists.

Then the other issue is to select the right shell and packages from the current system, which I think is a separate concern. For this I would propose to extend the flake schema to include currentSystem = { packages = []; devShell = <drv>; <...> }.

With both of these combined, flake-compat is the same as builtins.getFlake, and the flake schema would look something like this:

{ 
  description = "";
  inputs = {};
  outputs = inputs: {};
  currentSystem = {};
}
@edolstra
Copy link
Owner

What do you think if flake-compat was changed to provide the same output as builltins.getFlake?

Isn't that the case already?

@zimbatm
Copy link
Contributor Author

zimbatm commented Jan 12, 2021

It's quite close to being a poly-fill for builtins.getFlake, but not quite. It would need to output result without the defaultNix and shellNix attributes. And the input parameters aren't exactly the same as builtins.getFlake either.

@jsoo1
Copy link

jsoo1 commented Dec 9, 2021

It would actually also be really nice if it were possible to add polyfills for builtins.getFlake and builtins.fetchTree (inasmuch as that is possible).

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

3 participants