Skip to content
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

Show package priority in nix profile list #9802

Open
ustulation opened this issue Jan 18, 2024 · 1 comment
Open

Show package priority in nix profile list #9802

ustulation opened this issue Jan 18, 2024 · 1 comment
Labels
feature Feature request or proposal

Comments

@ustulation
Copy link

Is your feature request related to a problem? Please describe.

Currently nix profile list doesn't show the priority of the installed package. I need to check the currently selected profile's manifest.json to know the full picture. Other than this the listing has the same info as the manifest with the addition of index numbers which in the case of the manifest I need to manually derive by counting the position in the elements array.

Knowing the index number helps me to remove the precise entry I want with nix profile remove <n>. However I could have a binary with the same name installed with different priorities. E.g. multiple versions of jq might be installed with priorities 1, 2, 5, 8 etc. The currently used one would then be the jq with highest priority which is 1 in this example. However if I want to remove the jq that I had assigned the priority 5, I cannot do so simply by looking at the output of nix profile list as it gives me the index number but not the priority. OTOH, looking at the manifest.json gives me the priorities but not the index numbers (though I can trivially count their position in the JSON array). This mean in order to do this task, I need to look up both places, one to get the priority (and maybe the lock-hash) and then find the index corresponding to that in the other. Only then I can do nix profile remove <index-of-jq-with-priority-5>.

I don't see why we cannot just have the priority too in nix profile list.

Describe the solution you'd like

nix profile list should also give the priority of the installed packages. Then it'll be almost similar to the info from manifest.json which I suppose should just be an impl detail and not something the user should consult ordinarily.

Additional context
nix version 2.19.2

Add 👍 to issues you find important.

@ustulation ustulation added the feature Feature request or proposal label Jan 18, 2024
@bobvanderlinden
Copy link
Member

The problem of identifying profile entries using index is resolved by #9656.

However, the priorities are not listed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal
Projects
None yet
Development

No branches or pull requests

2 participants