-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
cli: read "paths" from stdin for commands that take them #7437
Labels
feature
Feature request or proposal
Comments
Just found |
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 12, 2023
Resolves NixOS#7437 If paths are also passed on the cli they will be combined with the ones from standard input.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 12, 2023
Resolves NixOS#7437 for new `nix` commands only. If paths are also passed on the cli they will be combined with the ones from standard input.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 12, 2023
Resolves NixOS#7437 for new `nix-store`.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 12, 2023
Resolves NixOS#7437 for new `nix` commands only. If paths are also passed on the cli they will be combined with the ones from standard input.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 12, 2023
Resolves NixOS#7437 for new `nix-store`.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 12, 2023
Resolves NixOS#7437 for new `nix` commands only by adding a `--stdin` flag. If paths are also passed on the cli they will be combined with the ones from standard input.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 12, 2023
Resolves NixOS#7437 for new `nix-store` by adding a `--stdin` flag.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 12, 2023
Resolves NixOS#7437 for new `nix` commands only by adding a `--stdin` flag. If paths are also passed on the cli they will be combined with the ones from standard input.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 12, 2023
Resolves NixOS#7437 for new `nix-store` by adding a `--stdin` flag.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Jan 13, 2023
Resolves NixOS#7437 for new `nix-store` by adding a `--stdin` flag.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Feb 11, 2023
Resolves NixOS#7437 for new `nix` commands only by adding a `--stdin` flag. If paths are also passed on the cli they will be combined with the ones from standard input.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Feb 11, 2023
Resolves NixOS#7437 for new `nix-store` by adding a `--stdin` flag.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Feb 28, 2023
Resolves NixOS#7437 for new `nix` commands only by adding a `--stdin` flag. If paths are also passed on the cli they will be combined with the ones from standard input.
nrdxp
added a commit
to nrdxp/nix
that referenced
this issue
Feb 28, 2023
Resolves NixOS#7437 for new `nix-store` by adding a `--stdin` flag.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
If the user wants to pass a list of paths to say
nix path-info
ornix-build
, they run the risk of recieving a "too many args" OS error.Since passing derivations around can be very efficient when handled in batches it would be nice not to have a cap on this. The current workaround is
xargs
, which I guess is fine, but not exactly intuitive or necessarily efficient.Describe the solution you'd like
I could see it two ways, if the command recieves a non-empty stdin, simply add it to whatever list of paths already exist in the cli, or we could make it explicit and require something like
nix-build -
to specify reading paths from stdin.Describe alternatives you've considered
Basically just keep using xargs, but even if the arg limit is not an issue, shell pipelines are far more readable than nested process substititions, e.g:
Additional context
Hit this a couple of times when trying to ensure the entire build closure is cached by parsing the results of a
--dry-run
: divnix/std-action/run/build.sh#14The text was updated successfully, but these errors were encountered: