all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: swedebugia@riseup.net
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Deleting services from %desktop-services in operating system declaration
Date: Thu, 21 Jan 2016 00:24:30 +0100	[thread overview]
Message-ID: <87io2nu95d.fsf@gnu.org> (raw)
In-Reply-To: <fcc6ea3ba9b421a0dac9897b020cdc1b@riseup.net> (swedebugia@riseup.net's message of "Wed, 20 Jan 2016 13:42:11 +0100")

swedebugia@riseup.net skribis:

> I have trouble getting the syntax right to delete avahi and wicd from
> my config.scm.

The correct syntax would be:

  (operating-system
    ;; …
    (services (remove (lambda (service)
                        (or (eq? (service-kind service)
                                 wicd-service-type)
                            (eq? (service-kind service)
                                 avahi-service-type)))
                      %desktop-services)))

As David notes, ‘%desktop-services’ is a list of service objects.  To
remove elements from a list, the right procedure is ‘remove’ (info
"(guile) SRFI-1 Filtering and Partitioning").

> The manual does not yet have examples of how to delete one or more
> entries from the %base-services or other lists.

I’ve added this example in commit 5d94ac5.

HTH!

Ludo’.

  parent reply	other threads:[~2016-01-20 23:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 12:42 Deleting services from %desktop-services in operating system declaration swedebugia
2016-01-20 13:28 ` Efraim Flashner
2016-01-20 14:17 ` Thompson, David
2016-01-20 23:24 ` Ludovic Courtès [this message]
2016-01-23 13:09   ` swedebugia
2016-01-23 16:43     ` Alex Kost
2016-01-25 11:20       ` swedebugia
2016-01-25 22:52         ` Alex Kost

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87io2nu95d.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=help-guix@gnu.org \
    --cc=swedebugia@riseup.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.