Ricardo Wurmus writes:

> One can either write a manifest using variable names or convert a list
> of spec strings to a manifest.  The latter case is used a lot at my
> institute and it’s unfortunate that this requires so much code (with
> emphasis on “code”, not on “so much”).
>
> Here’s an example:
>
> (define packages
>   (list "gfortran@5"
>         "gcc-toolchain@5"
>         "cdogs-sdl"))

and don't forget things like

   (list icedtea-8 "jdk")

or

   `(,icedtea-8 "jdk")

> ;; Boilerplate code to turn the above list of packages into a manifest
> (use-modules (gnu packages))
> (packages->manifest (map (compose list specification->package+output) 
> packages))

Yes, I finally found this and it is not very friendly/discoverable.

> Can we simplify this case by adding manifest readers for different
> formats?  One simple format could be plain text:

> # this is for compilers
> gfortran@5
> gcc-toolchain@5

Can I suggest sticking with s-expresions, and preferrably with something
that can be used verbatim in the packages section of (operating-system)?
New users will most probably have to maintain that too.

So something like

   (use-package-modules gcc)
   (packages
    ;; this is for compilers
    gfortran-5)

or go further even and add some sugar to remove use-package-modules and
do something like

   (package-strings
    ;; this is for compilers
    "gfortran@5"
    ;; this is for work
    "icedtea:jdk")

and have package-strings be usable in operating-system too?

Greetings,
janneke

-- 
Jan Nieuwenhuizen <[email protected]> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

Reply via email to