[Nix#10114] Expose the flake inputs to the flakes installables #49

Open
opened 2024-03-16 06:44:38 +00:00 by lix-bot · 0 comments
Member

Upstream-Issue: NixOS/nix#10114

Is your feature request related to a problem? Please describe.

It's not easy to act on the inputs of a flake from the command-line

Describe the solution you'd like

Allow <foo>#inputs in the command-line to access the inputs of the flake <foo>

Currently, <foo># corresponds to the outputs of the flake <foo>. We could make it also expose the flake metadata, like :lf on the repl.
That would make it possible to do things like:

$ nix build <foo>#inputs.nixpkgs.legacyPackages.x86-64_linux.hello
$ nix eval --raw <foo>#outPath
$ nix eval --raw <foo>#inputs.nixpkgs.rev

Describe alternatives you've considered

  • Part of that is already possible with --inputs-from, although in a less ergonomic way, we could just keep the status-quo:
    $ nix eval --inputs-from <foo> nixpkgs …
    

Additional context
Add any other context or screenshots about the feature request here.

Priorities

Add 👍 to issues you find important.

Upstream-Issue: https://git.lix.systems/NixOS/nix/issues/10114 **Is your feature request related to a problem? Please describe.** It's not easy to act on the inputs of a flake from the command-line **Describe the solution you'd like** Allow `<foo>#inputs` in the command-line to access the inputs of the flake `<foo>` Currently, `<foo>#` corresponds to the outputs of the flake `<foo>`. We could make it also expose the flake metadata, like `:lf` on the repl. That would make it possible to do things like: ```console $ nix build <foo>#inputs.nixpkgs.legacyPackages.x86-64_linux.hello $ nix eval --raw <foo>#outPath $ nix eval --raw <foo>#inputs.nixpkgs.rev ``` **Describe alternatives you've considered** - Part of that is already possible with `--inputs-from`, although in a less ergonomic way, we could just keep the status-quo: ```console $ nix eval --inputs-from <foo> nixpkgs … ``` **Additional context** Add any other context or screenshots about the feature request here. **Priorities** Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
lix-bot added the
imported
label 2024-03-16 06:44:38 +00:00
jade added the
Area/flakes
label 2024-03-30 00:06:39 +00:00
Sign in to join this conversation.
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: lix-project/lix#49
No description provided.