Systematize `nix build`, `nix shell`, `nix develop`, etc (tracking issue)
#10,504 opened on 2024年4月15日
説明
Is your feature request related to a problem? Please describe.
As discussed in the meeting of 2024-04-15, we propose a new, more systematic naming scheme for these commands, so that they fit into the noun-verb format. Aliases for the current "short commands" will be kept. The purpose of the scheme is to make it so that by following the aliases, the other, less used functionality becomes more easily discoverable.
Describe the solution
Add plumbing commands, and turn the short commands such as nix run into aliases that point to the right place in this noun-verb command hierarchy:
-
nix dev: behaviors that use anix develop-like interpretation of installables, or (later) #7501-
nix dev print-env:nix print-dev-env(rename+alias) -
nix dev shell:nix develop(rename+alias) -
nix dev run:nix develop -c(rename+alias) -
nix dev script: scoped out for now (could print a script suitable for$SHELL; depends on #7501)
-
-
nix env: commands that modify the environment-
nix env run: setenv + execvp?- not decided - maybe this should instead just be a flag to
nix run/nix package run? - we have better env manipulation now thanks to @bryanhonof https://github.com/NixOS/nix/pull/11494, so the new "original" name makes more sense
- not decided - maybe this should instead just be a flag to
-
nix env shell:nix shell, ie setenv + start$SHELL(rename+alias) - #10508
-
nix package: "normal" use of installable (whatever that means for the verb)-
nix package build:nix build(rename+alias) -
nix package run:nix run(rename+alias) - #10506
-
nix package edit:nix edit(rename+alias)
-
nix sandbox: issue tbd (@roberth)
Evaluate whether the code (also file layout, test layout) can be improved after the renames.
Describe alternatives you've considered
There's a long thread, #4715, but note that it's mostly about one or two command; it rarely discusses a naming system.
Additional context
This is somewhat based on https://github.com/NixOS/nix/issues/4715#issuecomment-917069357, but with new insights and team discussion.
Priorities
Add :+1: to issues you find important.