nix-community / nix-index

Quickly locate nix packages with specific files [maintainers=@bennofs @figsoda @raitobezarius]
Other
825 stars 48 forks source link

Show 'name'/alias #17

Open CMCDragonkai opened 6 years ago

CMCDragonkai commented 6 years ago

Is there a way instead of only showing the attribute path, to show the package alias/name if it is available?

bennofs commented 6 years ago

I am not sure why you'd need this, but the name is just the part after the first - in the store path. For example:

/nix/store/4v3fdagr3hfyyyv5pjf27kj3ifabqp5j-libuv-1.14.1

Here the name is libuv. It should not be hard to add an option to parse and show this to nix-index, I think the StorePath type already has a function to parse it.