guix-devel
[Top][All Lists]
Advanced

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

Re: Service refactoring


From: Ludovic Courtès
Subject: Re: Service refactoring
Date: Thu, 10 Sep 2015 18:14:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

The ‘wip-service-refactor’ currently does the easy part of the service
refactoring, which essentially turns the service procedures into regular
procedures (rather than monadic procedures.)

I think it’s important because it allows users to ‘map’ over
%base-services, for instance, possibly replacing some of the entries,
without actually touching the store (whereas currently, one would first
have to “bind” each item of %base-services, possibly affecting the
store.)

It also makes it easier for newcomers to fiddle with services in their
OS config file.

To do so, the branch adds a few “file-like objects” that really are just
counterparts of existing monadic procedures:

  • ‘computed-file’ returns an object with the same meaning as a
    ‘gexp->derivation’ call;

  • ‘program-file’ is the declarative counterpart of ‘gexp->script’.

These objects can be used anywhere in a gexp, which is probably going to
be useful in other places.

--8<---------------cut here---------------start------------->8---
+ 56d3d68 system: Make service procedures non-monadic.
+ 807d34a gexp: Add 'mixed-text-file'.
+ 03d2914 gexp: Add 'program-file'.
+ 82ad249 gexp: Add 'computed-file'.
+ 7dfa966 services: 'mingetty-service' no longer takes monadic values.
--8<---------------cut here---------------end--------------->8---

More to come!

Ludo’.



reply via email to

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