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

Add the possibility to search for files in the packages, like a command name #104

Closed
mickours opened this issue May 4, 2018 · 6 comments
Labels
enhancement New feature or request

Comments

@mickours
Copy link

mickours commented May 4, 2018

It would interesting to have a page that permits the users to search for a file in the packages. A good example is a program that you need but you only now the executable name that differ from the package name. For example, I was looking for the readelf command and I was not able to find it from the Packages search page or the nix search tool.

Debian has a good tool for that:
https://www.debian.org/distrib/packages#search_contents
The readelf example:
https://packages.debian.org/search?searchon=contents&keywords=%2Fbin%2Freadelf&mode=path&suite=stable&arch=any

It would be very nice to have a similar page in the Nixos site.

@samueldr
Copy link
Member

samueldr commented Jul 1, 2018

Agreed, though this would need server-side work to happen (or some service hosted elsewhere).

All current search pages on the website are completely handled client-side by having an index loaded from the server.

Using nix-index you can locally search for files for any package (as long as it's built on hydra). It may be possible to build a service that, as a backend, would use nix-index to return results.

@mickours
Copy link
Author

Also, command-not-found seems to do the job locally:

$ readelf
The program ‘readelf’ is currently not installed. You can install it by typing:
  nix-env -iA nixos.binutils-unwrapped

I'm using Zsh and the support was broken at the time I've created this issue.
Still, the idea remain interesting for systems that do not have command-not-found activated.

Maybe the command-not-found script can be adapted to be use as backend for the website as an alternative to nix-index.

@garbas garbas transferred this issue from NixOS/nixos-homepage Jun 17, 2020
@garbas garbas added the enhancement New feature or request label Jun 18, 2020
@ghost
Copy link

ghost commented Nov 10, 2021

I don't think "interesting" is the right word... nobody seems to know which packages supplies "phpize" and "php.h", and the packages they suggest do not exist in the search. Minding that I only use NixOS because Replit (my IDE) uses NixOS, it seems vital to any distribution to be able to locate the appropriate packages supplying the target tools when they exist at all.

@ysndr
Copy link
Member

ysndr commented Jan 24, 2022

With flakes we can already exctract app attributes
I have looked into integrating nix-index (for nixpkgs at least).
As far as I see it should be quite possible to either speak with hydra directly or (better) integrate nix-index and track files in <drv>/bin
It's a bigger amendment to nixos-search and not as pressing here as it's available as its own tool in form of nix-index

@fricklerhandwerk
Copy link
Contributor

Program names are now indexed. Another use case are libraries: #673

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-07-20-documentation-team-meeting-notes-65/30876/1

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

No branches or pull requests

6 participants