help-guix
[Top][All Lists]
Advanced

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

Re: List available versions of package.


From: Philippe Veber
Subject: Re: List available versions of package.
Date: Sat, 22 Jun 2019 13:26:18 +0200

Hello everyone,

FWIW, I tried the exact example given in the manual [0] and it failed,
although for a different reason. It does a lot of work until it reaches an
exception (the build of profile.drv fails). Could someone confirm this
should work? Also, is it expected that packages from guix commits dating
from a few years ago will still work in this setting? Thanks!

ph.

[0] https://www.gnu.org/software/guix/manual/en/guix.html#Inferiors

Le mar. 11 juin 2019 à 09:43, Philippe Veber <address@hidden> a
écrit :

> Hello Tobias, and thanks a lot for your answer!
>
> So as I understand it, the distribution at a given moment contains only a
> few versions (often one), and not all that have been specified at some
> point. For instance, with your command I obtain:
>
> $ guix package --list-available=^bowtie$
> bowtie 2.3.4.3 out gnu/packages/bioinformatics.scm:1505:2
>
> while I could check on guix git log that there has been more versions of
> this bowtie program :
>
> $ git log packages/bioinformatics.scm | grep "gnu: bowtie"
>     gnu: bowtie: Update to 2.3.4.3.
>     gnu: bowtie: Use 'modify-phases'.
>     gnu: bowtie: Update to 2.3.2.
>     gnu: bowtie: Update to 2.2.9.
>     gnu: bowtie: Update to 2.2.6.
>
> My use case is to be able to run old versions of software (like you've
> never heard that before, right ;o)?) so is it correct to think that I have
> to write a manifest file and then use a :
>
> guix environment --manifest bowtie_2.2.9.scm -- bowtie2 ...
>
> ?
> If so, I'm not absolutely clear on the contents of the manifest file. I
> tried to get inspiration from the section on "Inferiors" [0], and wrote
> this:
>
> %% bowtie_2.2.9.scm %%%%%%%%%%%%%
> (use-modules (guix inferior) (guix channels)
>              (srfi srfi-1))   ;for 'first'
>
> (define channels
>   ;; This is the old revision from which we want to
>   ;; extract guile-json.
>   (list (channel
>          (name 'guix)
>          (url "https://git.savannah.gnu.org/git/guix.git";)
>          (commit
>           "2642231b39d2f642364e96222690afce7c986bb6"))))
>
> (define inferior
>   ;; An inferior representing the above revision.
>   (inferior-for-channels channels))
>
> (packages->manifest
>  (list (first (lookup-inferior-packages inferior "bowtie"))))
> %%%%%%%%%%%%%%%
>
> but got the following result:
>
> $ guix environment --manifest=bowtie_2.2.9.scm -- bowtie2 --version
> Mise à jour du canal « guix » depuis le dépôt Git «
> https://git.savannah.gnu.org/git/guix.git »...
> ice-9/eval.scm:223:20: In procedure proc:
> erreur : %guix-register-program : variable non liée
> conseil : Auriez-vous oublié un `use-modules' ?
>
> Sorry for the french translation, but I assume you got that a module is
> missing (BTW, that might mean that the example given in the manual section
> for inferiors is missing it too). So for now I'm stuck, any help will be
> much appreciated!
>
> Cheers,
>   Philippe.
>
>
>
>
>
>
> [0] https://www.gnu.org/software/guix/manual/en/guix.html#Inferiors
>
>
>
> Le lun. 10 juin 2019 à 23:31, Tobias Geerinckx-Rice <address@hidden> a
> écrit :
>
>> Philippe,
>>
>> Philippe Veber wrote:
>> > I'm getting started with guix, and so far it's been just fine.
>>
>> Welcome!
>>
>> > I would like to see all available versions for a given package.
>> > Is there a command that would help me with that?
>>
>> There is:
>>
>>   $ guix package --list-available=^glibc$
>>   glibc 2.25    out,debug,static
>>   gnu/packages/base.scm:921:2
>>   glibc 2.22    out,debug,static
>>   gnu/packages/base.scm:980:2
>>   …
>>
>> For easier interactive use, you can use the short option ‘-A’.
>>
>> Note that this option takes a regular expression as argument.
>> That makes it powerful, but means you'll have to enclose the name
>> in ‘^…$’ if you want to match one specific package.
>>
>> Kind regards,
>>
>> T G-R
>>
>


reply via email to

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