help-guix
[Top][All Lists]
Advanced

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

Given a file, find the package that builds it


From: Chris Marusich
Subject: Given a file, find the package that builds it
Date: Fri, 30 Mar 2018 06:53:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Pierre Neidhardt <address@hidden> writes:

>>> A more general question: How do I find to which non-installed package a
>>> filename belongs?
>>
>> Guix does not currently know anything about the files inside each
>> package, I typically do a web search...
>
> This is too bad, I believe it's an important feature for any package
> manager.
> As far as I can tell, `portage` and `pacman` can both do it.
>
> Any plan regarding guix?

I don't know of any plan at the moment.  Nothing is stopping a motivated
individual from creating a mapping of packages to programs, of course,
and then making it available to anyone who is interested.

Here's one idea: what if somebody defined a package which used every
other package as input, scanned their output paths and created such a
mapping, and then wrote that mapping (or built a tool to easily query
that mapping) as its own output?  You could call it the "xiug" package!
;-)

Until a solution is created, I find that the following heuristic usually
works (where $program is the name of the program I'm interested in):

* Try: guix package --search=$program
* Search the Internet for $program, and find out what package provides
  the $program on existing distributions.  Then try "guix package
  --search=$package" where $package is the package name used in the
  other distro.  The name is often the same or similar.
* Brute force search your local store for the build output:
    find -L /gnu/store -iname "*${program}*"
* Ask on IRC or email!

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

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