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

Search for packages with a specific file (via nix-index/nix-locate) #2

Open
evanjs opened this issue Apr 18, 2020 · 1 comment
Open

Comments

@evanjs
Copy link

evanjs commented Apr 18, 2020

Perhaps the package search (or a separate search window) could defer to something like nix-locate (via nix-index) to allow users to search for packages containing a specific file.

I imagine this could be like a frontend for nix-locate, allowing users to utilize the nixos-manager GUI and skip any terminal commands, as nix-locate results can often be quite overwhelming, especially if --top-level or similar flags are neglected.


e.g.
command:
nix-locate glib-2.0.so -w1 --top-level

output:

spice-gtk.out
signal-desktop.out
glib.out

nix-index must be run before nix-locate, and I'm not sure how or if that would need to be implemented--vs simply telling the user they must run it first to utilize such features--but I figure such a feature would be quite helpful and not too difficult to implement... should it be deferred to something that already handles such indexing/searching, or at least the indexing.

@pmiddend
Copy link
Owner

Interesting. I didn't even know about nix-locate or nix-index, though I'm actually using command-not-found.sh regularly. :)

It'd be great to augment the search feature so it doesn't just search by package name (or description) in order to get more results (though the package name should be enough for most use cases, I hope). One could also imagine a more intelligent search string, where you might type something "foobar:inpackage" to specifically search using the nix-locate data base.

I'm going to leave this open and think about it some more at a later point in time (or give somebody else the chance to implement it).

Thanks for the suggestion anyway!

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

No branches or pull requests

2 participants