all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* lookup which file can be found in which package
@ 2023-06-02 17:36 W. T. Meyer
  2023-06-02 21:45 ` W. T. Meyer
  0 siblings, 1 reply; 5+ messages in thread
From: W. T. Meyer @ 2023-06-02 17:36 UTC (permalink / raw)
  To: help-guix

Hi everyone,

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.?

So far I haven't found a command doing this reading documentation, but
maybe there's a way to query the substitute servers if a certain file
can be found? nix has nix-index/nix-locate to query if a binary cache
has a derivation containing a specific file; which would roughly be what
I'm looking for in Guix as well.

Regards,

Wilko Meyer


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lookup which file can be found in which package
  2023-06-02 17:36 lookup which file can be found in which package W. T. Meyer
@ 2023-06-02 21:45 ` W. T. Meyer
  2023-06-02 22:27   ` Soren Stoutner via
  0 siblings, 1 reply; 5+ messages in thread
From: W. T. Meyer @ 2023-06-02 21:45 UTC (permalink / raw)
  To: help-guix


"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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lookup which file can be found in which package
  2023-06-02 21:45 ` W. T. Meyer
@ 2023-06-02 22:27   ` Soren Stoutner via
  2023-06-03 18:13     ` Edouard Klein
  0 siblings, 1 reply; 5+ messages in thread
From: Soren Stoutner via @ 2023-06-02 22:27 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

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


-- 
Soren Stoutner
soren@stoutner.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lookup which file can be found in which package
  2023-06-02 22:27   ` Soren Stoutner via
@ 2023-06-03 18:13     ` Edouard Klein
  2023-06-03 21:04       ` Soren Stoutner via
  0 siblings, 1 reply; 5+ messages in thread
From: Edouard Klein @ 2023-06-03 18:13 UTC (permalink / raw)
  To: Soren Stoutner; +Cc: help-guix

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lookup which file can be found in which package
  2023-06-03 18:13     ` Edouard Klein
@ 2023-06-03 21:04       ` Soren Stoutner via
  0 siblings, 0 replies; 5+ messages in thread
From: Soren Stoutner via @ 2023-06-03 21:04 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

Edouard,

On Saturday, June 3, 2023 11:13:25 AM MST you wrote:
> 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.


Debian solves this problem by doing exactly that, and then making the output searchable 
as a web service:


https://www.debian.org/distrib/packages[1]

In my opinion, this would be a really nice addition to https://packages.guix.gnu.org/[2].

-- 
Soren Stoutner
soren@stoutner.com

--------
[1] https://www.debian.org/distrib/packages
[2] https://packages.guix.gnu.org/

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-03 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02 17:36 lookup which file can be found in which package W. T. Meyer
2023-06-02 21:45 ` W. T. Meyer
2023-06-02 22:27   ` Soren Stoutner via
2023-06-03 18:13     ` Edouard Klein
2023-06-03 21:04       ` Soren Stoutner via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.