-
-
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
Systematize nix build
, nix shell
, nix develop
, etc (tracking issue)
#10504
Comments
OT: Perhaps Similarly |
Well , I would like to help in this issue, I am first time contributing here and would appreciate some help. |
No "idea approved" label yetBut that doesn't have to be a problem and I did propose this in a meeting, so it's not entirely crazy. Development setupA good place to get started is the page about development in the manual. This includes things like building it, and setting up First change to pickWhen you've run a local build, I think you could start with a rename like
I would guess that this is not actually a rename and alias in terms of implementation; only UX-wise. This probably involve some refactoring so that we have two commands invoking the same piece of code. If you're doing something that creates new behaviors that aren't simply aliases, also read up on testing. We do almost all of our CLI testing in More info about contributing is also in the manual and in CONTRIBUTING.md. |
So like should I wait till the idea is approved right? |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-11-27-nix-team-meeting-minutes-198/56691/1 |
Sorry ,I am kind of busy with my college exams and projects so didnt had much time recently but I would like to start if you okay with it , can you give me an general idea where to start and how. |
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) Allow to get rid ofnix develop
"shell" logic #7501nix 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 Allow to get rid ofnix develop
"shell" logic #7501)nix env
: commands that modify the environmentnix env run
: setenv + execvp?nix run
/nix package run
?set-env-var
toMixEnvironment
, and rename old ones #11494, so the new "original" name makes more sensenix env shell
:nix shell
, ie setenv + start$SHELL
(rename+alias)nix env print-env
: mirrorsnix dev print-env
- expected to be a simple command #10508Rejected 2024-11-27
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)nix package info
: new command, behaving like--dry-run --json
, but also printsmeta
#10506nix 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 #4715 (comment), but with new insights and team discussion.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: