guix-devel
[Top][All Lists]
Advanced

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

Including additional modules in dmd services


From: David Thompson
Subject: Including additional modules in dmd services
Date: Thu, 19 Nov 2015 22:47:55 -0500
User-agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu)

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 via email to

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