-
Couldn't load subscription status.
- Fork 514
feature nix: add option useAttrPath to use packages attribute path #787
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
feature nix: add option useAttrPath to use packages attribute path #787
Conversation
|
@microsoft-github-policy-service agree |
|
Thank you for the contribution. This sounds like a great addition. |
|
@eljog hello~ just ping to see how was the result, still waiting for one approving review to be merge 😃 |
ba85e37 to
da7abcc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this super cool Feature option, appreciate it ✨
Left some minor comments, otherwise looks great!
|
@samruddhikhandale all fixed, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡
|
sorry, forget to update the opiton name to useAttributePath in test. updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 Thanks!
Add an option
useAttrPathto install packages withnix-env -iAName conversion
If package name doesn't start with
nixpkgs.,nixpkgs.will be added as prefix to pacakge name automatically.Compatibility
useAttrPathusefalseas default value, which won't break existing usage and remains compatibility.Precision and Reliability
Using
nix-env -iAensures the installation of the exact package specified by its attribute path. This precision eliminates any ambiguity that might arise fromnix-env --install, which can install unintended packages if multiple matches are found for a given name or description.Consistency with NixOS Package Search
The attribute paths used with
nix-env -iAdirectly correspond to those listed on the NixOS package search site(https://search.nixos.org/packages). This consistency simplifies the process of finding and installing packages as per official documentation and resources.