From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Including additional modules in dmd services Date: Thu, 19 Nov 2015 22:47:55 -0500 Message-ID: <87bnap49hw.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zzcg4-0000se-Dr for guix-devel@gnu.org; Thu, 19 Nov 2015 22:48:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zzcg1-0005pG-48 for guix-devel@gnu.org; Thu, 19 Nov 2015 22:48:00 -0500 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:35964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zzcg0-0005pC-QV for guix-devel@gnu.org; Thu, 19 Nov 2015 22:47:57 -0500 Received: by qkda6 with SMTP id a6so32893961qkd.3 for ; Thu, 19 Nov 2015 19:47:56 -0800 (PST) Received: from izanagi (209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com. [209.6.40.86]) by smtp.gmail.com with ESMTPSA id f129sm3098536qhe.45.2015.11.19.19.47.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Nov 2015 19:47:55 -0800 (PST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org 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