guix-devel
[Top][All Lists]
Advanced

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

Re: Finding the store path of a package


From: Konrad Hinsen
Subject: Re: Finding the store path of a package
Date: Mon, 22 Mar 2021 08:39:13 +0100

Hi Ludo,

> Yes.  In the presence of grafts, run “guix build PKG”.  That always
> gives you the store file name of PKG, 100% reliable!

At the cost of a few hours of CPU time, in the worst case.

> I regularly do things like:
>
>   ls $(guix build PKG)/bin
>   find $(guix build PKG) -name …

What I am looking for is the equivalent of

   ls $(guix build PKG)

that fails in whatever way for packages that are not in the store, but
guarantees (1) not adding anything to the store and (2) response times
short enough for interactive user interfaces.

> If you want a variant that does that without building/downloading it,
> it’s also possible, though not as easily from the command line.

Guile is fine, no problem. But so far, I haven't found anything even at
the Guile level that respects my two conditions.

Background: I am working on a interactive UI for running reproducible
computations via Guix:

  https://github.com/khinsen/guix-gtoolkit/

I'd like to implement (1) browsing package contents ("what exactly do I
get by adding "core-utils" to my environment?") and (2) searching
packages by the files they contain ("which package do I have to add to
my environment to get the ls command?"). There will be a button for
explicitly building a package, but I don't want it to happen as a side
effect when doing operations that need to be fast.

Cheers,
  Konrad.



reply via email to

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