Hello, I am new to the nix package manager, and I am very confused about how packages are identified and named.
Let me try to present a scenario that confuses me.
When I go to search and search for a package I sometimes get multiple packages with the same name. For instance, I had to install zoom, and there turned out to be two different packages named
zoom (see zoom search). The first one is for “
Player for Z-Code, TADS and HUGO stories or games” (not sure what it is used for) and the second one is “
zoom.us video conferencing application”. It was the second one that I needed, and it also had a unique attribute path (I assume that is what it is called) of
nixpkgs.zoom-us. The first one had the attribute path
nixpkgs.zoom. This is good since I am able to distinguish the two different packages when installing one of them. However, when one of them is installed it appears in the output of
nix-env -q as
zoom no matter if it is the first or the second one. Now my confusion is, how can I distinguish between these two packages that clearly have different functionality, but identical names when installed?
Of cause you could argue that they have different versions, and I could check the version of the installed package and use it to identify which “zoom” package it is, however they could have had the same version , by accident, which would make it impossible to know which “zoom” application was installed.
I feel like there should be a way to distinguish these packages, such that I could for instance tell nix that I want to upgrade the package, and then nix would fetch the newest version of zoom from the somewhere. However, as far I can see there is no way to get the attribute path of a package (get the
nixpkgs.zoom-us name from the locally installed package).
I guess my confusion boils down to a few questions:
- How are packages identified when installed locally?
- How are packages identified on nixpkgs?
- How do you find out where a locally installed package was installed from? Was it
- In general what does the different attributes of a package mean in relation to identifying it? (
version, the attribute path, …?)
I hope some of you can help clarify this.
I am very exited to learn more about nix, and aside from my confusion I am very impressed with the principles of which nix is based on.