From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: [PATCH] gnu.scm: add syntatic sugar macros for use-modules of packages, services, and system in the OS EDSL. Date: Mon, 19 Jan 2015 07:54:43 -0500 Message-ID: <87y4ozhqwc.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDBqz-0002c2-14 for guix-devel@gnu.org; Mon, 19 Jan 2015 07:54:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDBqx-0003fi-Lw for guix-devel@gnu.org; Mon, 19 Jan 2015 07:54:48 -0500 Received: from mail.fsf.org ([208.118.235.13]:41818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDBqx-0003fe-JF for guix-devel@gnu.org; Mon, 19 Jan 2015 07:54:47 -0500 In-Reply-To: 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: jgrant@parenthetical.io, guix-devel@gnu.org jgrant@parenthetical.io writes: > These macros allow for nicer and more condensed loading of package,=20 > service, and system modules in the OS EDSL. For an example of this,=20 > please take a look of the sample-os-config.scm (above the commented-out=20 > line). I like it. > I want to thank davexunit for his influence on this , this will be my=20 > first non-package recipe config. :^) :) > From ee940d31ec9b3847c1bd9dfe817ba8f6550361bc Mon Sep 17 00:00:00 2001 > From: "Joshua S. Grant" > Date: Sun, 18 Jan 2015 16:23:21 -0600 > Subject: [PATCH] [PATCH] gnu.scm: add syntactic sugar macros for use-modu= les > of packages, services, and system in the OS EDSL. > > --- > gnu.scm | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/gnu.scm b/gnu.scm > index eb0bf71..bca4586 100644 > --- a/gnu.scm > +++ b/gnu.scm > @@ -1,5 +1,6 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2014 Ludovic Court=C3=A8s > +;;; Copyright =C2=A9 2015 Joshua S. Grant > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -44,4 +45,19 @@ > (module-use! i (resolve-interface m)))) > %public-modules))) >=20=20 > +;;; Commentary: > +;;; > +;;; Macros that add Syntatic Sugar to use-modules of packages, services,= and system. > +;;; > +;;; Code: The 'Commentary', and 'Code' stuff is saved for the very top of a module file. Just leave the actual comment (using 2 semi-colons instead of 3) and make sure to keep lines under 80 characters. Use the 'fill-paragraph' function in Emacs to do it. > + > +(define-syntax-rule (use-package-modules module ...) > + (use-modules (gnu packages module) ...)) > + > +(define-syntax-rule (use-service-modules module ...) > + (use-modules (gnu services module) ...)) > + > +(define-syntax-rule (use-system-modules module ...) > + (use-modules (gnu system module) ...)) > + > ;;; gnu.scm ends here > --=20 > 2.1.0 Looking good! --=20 David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate