Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute paths with --arg and --argstr #1850

Open
Ericson2314 opened this issue Feb 7, 2018 · 3 comments
Open

Attribute paths with --arg and --argstr #1850

Ericson2314 opened this issue Feb 7, 2018 · 3 comments
Assignees
Labels
cli The old and/or new command line interface feature Feature request or proposal

Comments

@Ericson2314
Copy link
Member

Ericson2314 commented Feb 7, 2018

Nix CLIs should support --arg and --argstr flags with paths containing more than one attribute.

The semantics of --arg and --argstr are a bit complicated (perhaps over-complicated, but that's another issue, CC @cleverca22), so I will specify via desugaring:

  1. --argstr <single-attr> 'foo' becomes --arg <single-attr> '"foo"' just like today.
  2. --arg some-attr.remaining0 expr0 ...--arg some-attr.remainingN experN becomes --arg some-attr '{ remaining0 = expr0; ...remainingN = exprN; }'
  3. (Multiple-attribute remainingN in the attribute set are similarly decomposed and grouped just like today.)

This fills in what's IMO an awkward gap in the CLI, but also is important for making cross compilation more ergonomic.

CC @dtzWill

@lheckemann
Copy link
Member

I think you meant @cleverca22 ?

@Ericson2314
Copy link
Member Author

Ah yeah. Thanks.

@shlevy shlevy added the backlog label Apr 1, 2018
@shlevy shlevy self-assigned this Apr 1, 2018
@stale
Copy link

stale bot commented Feb 14, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 14, 2021
@fricklerhandwerk fricklerhandwerk added feature Feature request or proposal cli The old and/or new command line interface and removed improvement labels Sep 13, 2022
@stale stale bot removed stale labels Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli The old and/or new command line interface feature Feature request or proposal
Projects
None yet
Development

No branches or pull requests

6 participants