nix run --command #659

Open
opened 2025-02-07 08:39:51 +00:00 by dwt · 0 comments

When trying to run the namei binary from util-linux via nix run this fails because with nix run nixpkgs#util-linux there is no way to specify which of the many binaries to run. Same problem with other packages like coreutils.

Describe the solution you'd like

I propose that nix run provides the same interface as nix shell does, namely

      · --command / -c command args Command and arguments to be executed, defaulting to $SHELL

So they behave the same and I can apply what I learned with both of them.

Describe alternatives you've considered

nix shell nixpkgs#util-linux -c namei path/to/file

## Is your feature request related to a problem? Please describe. When trying to run the `namei` binary from util-linux via nix run this fails because with `nix run nixpkgs#util-linux` there is no way to specify which of the many binaries to run. Same problem with other packages like coreutils. ## Describe the solution you'd like I propose that nix run provides the same interface as `nix shell` does, namely ``` · --command / -c command args Command and arguments to be executed, defaulting to $SHELL ``` So they behave the same and I can apply what I learned with both of them. ## Describe alternatives you've considered `nix shell nixpkgs#util-linux -c namei path/to/file`
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#659
No description provided.