From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: guix-devel@gnu.org
Subject: Re: new manifest format readers?
Date: Fri, 9 Jun 2017 17:08:21 +0200 [thread overview]
Message-ID: <20170609170821.72f5df6a@alma-ubu> (raw)
In-Reply-To: <87zidhcqr9.fsf@elephly.net>
On Fri, 09 Jun 2017 14:03:22 +0200
Ricardo Wurmus <rekado@elephly.net> wrote:
> 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 "gfortran@5"
> "gcc-toolchain@5"
> "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
> gfortran@5
> gcc-toolchain@5
>
> # 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?
Cool :-)
I use Guix for a year now and haven't herd of the Manifests until
recently (contrary to what Mathieu stated), I just use the profile
generational or add my packages to the system-configuration.
I just stumbled over Manifests because I wanted to give Cuirass a try
and there I convert a list of package-strings into a manifest (as
explained in the Guix manual). I really thought how brainfucked this
is, if you are not used to Scheme and returning multiple values. Worse,
if you have one typo in your file, you are confronted with an obscure
stacktrace.
So, definitely a good idea!
And I would like to see it integrated into Cuirass: Currently I have to
prepare a complicated configuration, and a Scheme file that must contain
a function that takes a store (what is that? And why should _I_ care
about that?) and returns a data-structore of ... was it manifests or
derivations or ...
Instead, just give the git repository and a file with packages-list as
you proposed.
Björn
next prev parent reply other threads:[~2017-06-09 15:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 12:03 new manifest format readers? Ricardo Wurmus
2017-06-09 13:09 ` Mathieu Othacehe
2017-06-09 13:56 ` Ludovic Courtès
2017-06-09 13:58 ` Jan Nieuwenhuizen
2017-06-09 14:58 ` Ricardo Wurmus
2017-06-10 2:06 ` Arun Isaac
2017-06-11 14:15 ` Ludovic Courtès
2017-06-11 15:44 ` Ricardo Wurmus
2017-06-11 21:16 ` Ludovic Courtès
2017-06-12 3:56 ` Jan Nieuwenhuizen
2017-06-12 8:31 ` Chris Marusich
2017-06-09 15:08 ` Björn Höfling [this message]
2017-06-09 18:12 ` Ricardo Wurmus
2017-06-10 17:19 ` myglc2
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170609170821.72f5df6a@alma-ubu \
--to=bjoern.hoefling@bjoernhoefling.de \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).