guix-devel
[Top][All Lists]
Advanced

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

new manifest format readers?


From: Ricardo Wurmus
Subject: new manifest format readers?
Date: Fri, 09 Jun 2017 14:03:22 +0200
User-agent: mu4e 0.9.18; emacs 25.2.1

Hi Guix,

I received some feedback on the usability of Guix and one of the points
I got was about manifests.

For the simplest case, a user may just want to ask Guix to install
a fixed set of packages at specified versions.  Currently, doing this
involves some boilerplate code.

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:

--8<---------------cut here---------------start------------->8---
(define packages
  (list "address@hidden"
        "address@hidden"
        "cdogs-sdl"))

;; 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))
--8<---------------cut here---------------end--------------->8---

It’s not bad, but when a person uses specification strings they really
just care about the package names and versions.

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

--8<---------------cut here---------------start------------->8---
# this is for compilers
address@hidden
address@hidden

# this is for fun
cdogs-sdl
--8<---------------cut here---------------end--------------->8---

The manifest reader would just discard # comments and interpret each
non-empty line as a spec string.

While I love Scheme, I don’t think anything is to be gained from
exposing users who don’t want to use Scheme for manifests to opaque
blobs of code and syntax they don’t want to understand.

What do you think?

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




reply via email to

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