flake inputs #540

Closed
opened 2021-09-16 05:01:27 +02:00 by blaggacao · 4 comments
blaggacao commented 2021-09-16 05:01:27 +02:00 (Migrated from github.com)

It seems currently not documented (nor ergonomic) to fetch flake in config.inputs.

I'd propose a new argument: fetchFlakeInput which shells out to flake.lock to get the relevant info:

# makes.nix
{
  inputs = {
    cardano-node = fetchFlakeInput "cardano-node";
  };
}
It seems currently not documented (nor ergonomic) to fetch flake in `config.inputs`. I'd propose a new argument: `fetchFlakeInput` which shells out to `flake.lock` to get the relevant info: ```nix # makes.nix { inputs = { cardano-node = fetchFlakeInput "cardano-node"; }; } ```
blaggacao commented 2021-09-16 05:03:00 +02:00 (Migrated from github.com)

This can be a trampoline to substitute makes.lock.nix and other hard coded inputs in the case a flake.lock file is detected and the corresponding "magic" input is present. — all without using any nix3 functionality on the end-user side.

This can be a trampoline to substitute `makes.lock.nix` and other hard coded inputs in the case a `flake.lock` file is detected and the corresponding "magic" input is present. — all without using any `nix3` functionality on the end-user side.
blaggacao commented 2021-09-16 05:17:40 +02:00 (Migrated from github.com)

Maybe we can rather implement this in the inputs option itself so that it gets auto-populated with flake.lock inputs if that file is present... 🤔 (with an option to make it explicit and self documenting adoptFlakeInputs = true; (false by default).

Maybe we can rather implement this in the `inputs` option itself so that it gets auto-populated with `flake.lock` inputs if that file is present... :thinking: (with an option to make it explicit and self documenting `adoptFlakeInputs = true;` (`false` by default).
blaggacao commented 2021-09-17 18:48:50 +02:00 (Migrated from github.com)

I think I'll iterate on this one, for now.

I think I'll iterate on this one, for now.
blaggacao commented 2021-09-17 22:16:22 +02:00 (Migrated from github.com)

closed via #561

closed via #561
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
justin/makes#540
No description provided.