help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lookup which file can be found in which package


From: Edouard Klein
Subject: Re: lookup which file can be found in which package
Date: Sat, 03 Jun 2023 20:13:25 +0200
User-agent: mu4e 1.8.13; emacs 28.2

My usual method is first: guix search, then: grep -ri in a checkout of
the source, and last searching the web for the package name in other
distros, and a bit of guesswork. It usually endup in a *-utils or
*-tools package.

>From a computer science standpoint this is an interesting problem.

The content of the store is the output of a program, so
discovering what it is reduces to the Halting Problem, which can't be
solved by automatic means for all packages.

Of course most packages are nicely coded, and grep usually find the
answer. Nevertheless, the only way to solve this for all packages would
be to install all packages and grep the store... i.e. run all programs
to completion and look at the output.

If you build a program to analyze the package code before it is
executed, one can always build a pathological package that will make it
fail (the canonical example would be a package that incorporates the
code of the checker, runs the checker on itself, and chose the answer
that makes the checker fail, but one can make a package whose output
depends on the Riemann conjecture being false, for example).

Cheers,



Soren Stoutner via <help-guix@gnu.org> writes:

> [[PGP Signed Part:Undecided]]
> This would be a nice feature that I hope gets implemented some day.
>
> On Friday, June 2, 2023 2:45:28 PM MST W. T. Meyer wrote:
>> "W. T. Meyer" <w@wmeyer.eu> writes:
>> > Is there a quick way in Guix to figure out which package provides which
>> > file similar to what other package managers provide with dnf
>> > provides/apt-file search/nix-locate etc.?
>>
>> There's an open patch for a guix index command mention on the
>> guix-patches mailing list:
>> https://lists.gnu.org/archive/html/guix-patches/2023-03/msg01210.html
>>
>> I guess this answers my question.
>>
>> - Wilko



reply via email to

[Prev in Thread] Current Thread [Next in Thread]