Closed adrian-gierakowski closed 1 year ago
another way of achieving this would be to split the code into 2 function
defaultNix
and shellNix
then if one wanted to extract arbitrary stuff from the flake they could compose 1 with a function of their own choosing. These could live in a separate file (lib.nix) so that the interface of default.nix
could remain unchanged
sorry for the noise, the entire parsed flake is already returned within defaultNix
:
things like:
lib
,modules
, or any other arbitrary attrsproposal: add and optional
getExtraAttrs
(orextractExtraAttrs
) argument here:https://github.com/edolstra/flake-compat/blob/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9/default.nix#L8
which would be expected to be a function from flake result to attrs, with the result merged into here