unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Including additional modules in dmd services
@ 2015-11-20  3:47 David Thompson
  2015-11-20 14:03 ` Ludovic Courtès
  2015-11-25 11:04 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: David Thompson @ 2015-11-20  3:47 UTC (permalink / raw)
  To: guix-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-25 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-20  3:47 Including additional modules in dmd services David Thompson
2015-11-20 14:03 ` Ludovic Courtès
2015-11-25 11:04 ` Ludovic Courtès

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).