[Nix-dev] how to find packages by file?

Profpatsch mail at profpatsch.de
Wed Mar 15 15:55:54 CET 2017


On 17-03-15 01:13pm, Linus Heckemann wrote:
> On 14/03/17 20:24, Roni Choudhury wrote:
>  2. Use nix-repl — `nix-repl '<nixpkgs>'` will give you a REPL for the
> nix language with autocompletion for that sort of thing, which can be
> very helpful.

Can confirm. Normally I use
find /nix/store -iname "*library.so"
to find the package name,
then I grep nixpkgs for that name
then I look at the outputs (whether it’s in `lib` or `out`)
then I grep nixpkgs for the filename to find the attribute name

The naming schemes are pretty similar, it could probably
be automated fairly well.

-- 
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.


More information about the nix-dev mailing list