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

Roni Choudhury aichoudh at gmail.com
Tue Mar 14 21:24:32 CET 2017


Hi all-

I have some newbie-type questions, I hope that's ok.

Right now I am trying to set up a shell.nix file for a project that is not
necessarily designed to work under Nix. I'm going about this mainly by
dropping into an "empyt" shell, ru nning the build process, observing what
fails, then adding a dependency to shell.nix file and trying again.

My main question is, *how do I know what package to include to make use of
a given file?* By way of example, I currently require the file
*libpangocairo-1.0.so.0*. I have this file in my nix store, at this path:
*/nix/store/zb524gnvar0ymb47m1jcy667f7cci6g1-pango-1.40.3/lib/libpangocairo-1.0.so.0*.
However, if I include "pango" in my buildInputs, I wind up with the package
at path */nix/store/d2xiaxchih5wz4h9kgndfz3qj8vn1znr-pango-1.40.3-bin*,
which does not contain the library files I need, nor even a lib directory.
With fontconfig, I am able to include fontconfig.lib in my buildInputs to
get the libraries for that package (and also fontconfig.dev to get header
files, etc.), but pango has no lib attribute. So my second question is, *how
do I know whether a package has .lib or .dev attributes?*

A followup question: *if I didn't have libpangocairo.* already in my store,
how would I know which package delivers it?*

And perhaps a related final question: *how do I know where a given
directory in /nix/store "came from" - that is, how can I link something in
the store to something in nixpkgs?*

I realize these are probably basic questions, but I'm trying to bootstrap
myself into higher understanding. Thanks in advance!

roni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170314/25b92d0b/attachment-0001.html>


More information about the nix-dev mailing list