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 = {};
}
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-compatis the same asbuiltins.getFlake, and the flake schema would look something like this: