Skip to content

cli: Match multiple --out-link for multiple installables #11183

Open
@mmlb

Description

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

Its frustrating to try to build multiple installables and map them to result,result-N output links.

Describe the solution you'd like

I'd like to have an easy way to define output links that map to installables in the on nix build invocation.

I think it'd be nice if I could either pass in a comma separated list to --out-link or multiple --out-link calls but that could break some other workflow (but maybe thats fine considering #7701), alternatively a new param like --out-links result-foo,result-bar could work too.

Describe alternatives you've considered

I'm currently doing the following:

nix build --no-link .#foo .#bar
nix build --out-link result-foo .#foo
nix build --out-link result-bar .#bar

I've also considered using --print-out-paths and setting bash variables from the return.

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposalnew-cliRelating to the "nix" command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions