unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Thompson <dthompson2@worcester.edu>
To: guix-devel@gnu.org
Subject: Including additional modules in dmd services
Date: Thu, 19 Nov 2015 22:47:55 -0500	[thread overview]
Message-ID: <87bnap49hw.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (raw)

Hello hackers,

I am finally getting up to speed on the new service API, and I believe
I've run into a limitation of dmd services.  I wanted to use 'match'
from (ice-9 match) in the "start" action for a dmd service, like so:

    (dmd-service
     (provision '(foo))
     (documentation "Foo service.")
     (requirement '(user-processes))
     (start #~(begin
                (use-modules (ice-9 match))
                (match #$something
                  (foo ...))))
     (stop #~(const #t)))

The problem is that, while the module is successfully imported, the
'match' form is not treated as syntax, and thus the service fails with
an unbound variable 'foo' exception.  I hacked 'dmd-configuration-file'
in gnu/services/dmd.scm to import (ice-9 match) in the top-most
'use-modules' form of the 'config' gexp and then my service worked as
intended.

Am I just doing it wrong?  If it's a real limitation, what would be the
best way to specify the additional modules needed?  I looked around at
the various dmd services and couldn't find any other examples of needing
macros from another module.  I would love to know how to resolve this so
that I can continue my quest of managing user SSH keys with a dmd
service.

Thanks,

-- 
David Thompson
GPG Key: 0FF1D807

             reply	other threads:[~2015-11-20  3:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20  3:47 David Thompson [this message]
2015-11-20 14:03 ` Including additional modules in dmd services Ludovic Courtès
2015-11-25 11:04 ` Ludovic Courtès

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=87bnap49hw.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me \
    --to=dthompson2@worcester.edu \
    --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).