Compatibility with builtins.getFlake
#15
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/flake-compat#15
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 asbuiltins.getFlake
, and the flake schema would look something like this:Isn't that the case already?
It's quite close to being a poly-fill for
builtins.getFlake
, but not quite. It would need to outputresult
without thedefaultNix
andshellNix
attributes. And the input parameters aren't exactly the same asbuiltins.getFlake
either.It would actually also be really nice if it were possible to add polyfills for
builtins.getFlake
andbuiltins.fetchTree
(inasmuch as that is possible).