guix-devel
[Top][All Lists]
Advanced

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

Re: proposal: (define (find-guix-packages list-of-names) ... )


From: Ludovic Courtès
Subject: Re: proposal: (define (find-guix-packages list-of-names) ... )
Date: Sun, 15 Nov 2015 21:35:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Florian Paul Schmidt <address@hidden> skribis:

> +(define (find-guix-packages list-of-names)
> +  (map
> +   car
> +   (map
> +    find-packages-by-name
> +    list-of-names)))

[...]

> I am aware that is maybe still too simplistic. E.g.: It might be good
> to check if the name is ambiguous instead of just taking the first
> result and throw an error in that case.

Indeed.  ;-)

> As a typical programmer I am allergic to seemingly redundant and
> automatable tasks, so I'd love to see something at least similar in
> spirit in guix.

I can sympathize with this.

I think ‘specification->package’ from (gnu packages) is the procedure
you want.  Like this:

  (map specification->package
       '("guile-2" "gnupg-2.0" "coreutils"))

It emits a warning in case the specification is ambiguous.

Maybe we could/should use it in the example GuixSD configurations, and
at least document it somewhere.

WDYT?

Thanks,
Ludo’.



reply via email to

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