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

nix profile stores a 'resolved' source attribute #10077

Open
bobvanderlinden opened this issue Feb 25, 2024 · 0 comments
Open

nix profile stores a 'resolved' source attribute #10077

bobvanderlinden opened this issue Feb 25, 2024 · 0 comments
Labels
bug new-cli Relating to the "nix" command profiles Versioned gc root symlinks; nix profile, nix-env

Comments

@bobvanderlinden
Copy link
Member

bobvanderlinden commented Feb 25, 2024

Describe the bug

Currently whenever an package is installed using nix profile, the fragment of an installable is 'resolved'. For instance, nixpkgs#nodejs is implicitly resolved to flake:nixpkgs#legacyPackages.x86_64-linux.nodejs. This is somewhat confusing.

It would be nice if the original source flake uri is stored.

In addition, this could be a steppingstone toward supporting #10064.

Steps To Reproduce

$ nix profile install nixpkgs#nodejs
$ nix profile list
...
Name:               nodejs
Flake attribute:    legacyPackages.x86_64-linux.nodejs
Original flake URL: flake:nixpkgs
Locked flake URL:   github:NixOS/nixpkgs/9a9dae8f6319600fa9aebde37f340975cab4b8c0
Store paths:        /nix/store/vz13mi0w75q96sfjxz2ylnv8812hvf34-nodejs-20.11.1

Expected behavior

It would be nice to just see the original flake URI instead:

$ nix profile install nixpkgs#nodejs
$ nix profile list
...
Name:               nodejs
Installable:        nixpkgs#nodejs
Locked installable: github:NixOS/nixpkgs/9a9dae8f6319600fa9aebde37f340975cab4b8c0#legacyPackages.x86_64-linux.nodejs
Store paths:        /nix/store/vz13mi0w75q96sfjxz2ylnv8812hvf34-nodejs-20.11.1

Additional context

Part of #7966

Priorities

Add 👍 to issues you find important.

@roberth roberth added new-cli Relating to the "nix" command profiles Versioned gc root symlinks; nix profile, nix-env labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new-cli Relating to the "nix" command profiles Versioned gc root symlinks; nix profile, nix-env
Projects
None yet
Development

No branches or pull requests

2 participants