[Nix-dev] Presenting nix-index: a file-not-found utility

Danylo Hlynskyi abcz2.uprola at gmail.com
Sat Apr 22 08:03:13 CEST 2017


Great!
A question: what does it mean when expression is in round parents?

(wineUnstable.out)                                2,141 r /nix/store/
cl7b6kw7y8cqkpy4pnwwq4iqmaiw52d0-xextproto-7.3.0/include/
X11/extensions/secur.h

2017-04-21 13:36 GMT+03:00 Benno Fünfstück <benno.fuenfstueck at gmail.com>:

> Hello nixers,
>
> finding the package that provides a certain file in nixpkgs can be hard.
> That is why I've written a tool to make the process easier, which I thought
> would be helpful for other people as well: https://github.com/
> bennofs/nix-index
>
> To use it, you first have to generate an index:
>
> $ nix-index # this will generate an index for `<nixpkgs>` in NIX_PATH
>
> Note that it relies on the `ls{,.xz}` files from hydra, so for best
> results you should use it with `<nixpkgs>` pointing at a channel to
> maximize the chance of a path being available in the binary cache.
>
> You also need to make sure that all packages in `<nixpkgs>` evaluate. This
> is currently not the case for `nixos-unstable` or `nixos-17.03` (due to
> some obsolete haskell overrides). So if you're not using `nixpkgs-unstable`
> as your channel, you can instead run the following command to generate the
> index using the `nixpkgs-unstable` channel: (the `-f` argument works like
> the one from `nix-env`):
>
> $  nix-index -f https://d3g5gsiof5omrk.cloudfront.net/nixpkgs/
> nixpkgs-17.09pre105825.67adf69a16/nixexprs.tar.xz
>
> You can then search for files using `nix-locate`:
>
> $ nix-locate 'extensions/secur.h'
> xorg.xextproto.out                                2,141 r /nix/store/
> riqpq4m0h0hqgif0kkwxkhzjpvz81x3g-xextproto-7.3.0/include/
> X11/extensions/secur.h
> (wineUnstable.out)                                2,141 r /nix/store/
> cl7b6kw7y8cqkpy4pnwwq4iqmaiw52d0-xextproto-7.3.0/include/
> X11/extensions/secur.h
>
> The attribute path in parentheses indicates that the exact expression is
> unknown, but the store path is in the closure of the printed attribute.
>
> For more information, see the `--help` of the commands.
>
>
> Regards,
>
> Benno Fünfstück
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170422/ff3625f2/attachment.html>


More information about the nix-dev mailing list