From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcD1W-0000s2-7G for guix-patches@gnu.org; Wed, 26 Dec 2018 12:31:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcD1K-0004dz-0W for guix-patches@gnu.org; Wed, 26 Dec 2018 12:31:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:41595) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gcD1J-0004dm-T4 for guix-patches@gnu.org; Wed, 26 Dec 2018 12:31:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gcD1J-0005C2-M5 for guix-patches@gnu.org; Wed, 26 Dec 2018 12:31:01 -0500 Subject: [bug#33836] [PATCH 1/2] services: configuration: Add location. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <874lb45nov.fsf@gmail.com> <20181223154021.14287-1-go.wigust@gmail.com> Date: Wed, 26 Dec 2018 18:30:09 +0100 In-Reply-To: <20181223154021.14287-1-go.wigust@gmail.com> (Oleg Pykhalov's message of "Sun, 23 Dec 2018 18:40:20 +0300") Message-ID: <87d0poci1q.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Oleg Pykhalov Cc: 33836@debbugs.gnu.org Hello, Oleg Pykhalov skribis: > * gnu/services/configuration.scm (define-configuration): Add location. > * gnu/services/mail.scm (namespace-configuration)[location]: Rename to > 'mailbox-location'. > (uglify-field-name): Handle this. > * doc/guix.texi (Mail Services): Document this. Nice! > --- a/gnu/services/configuration.scm > +++ b/gnu/services/configuration.scm > @@ -22,6 +22,7 @@ > #:use-module (guix packages) > #:use-module (guix records) > #:use-module (guix gexp) > + #:use-module ((guix utils) #:select (source-properties->location)) > #:autoload (texinfo) (texi-fragment->stexi) > #:autoload (texinfo serialize) (stexi->texi) > #:use-module (ice-9 match) > @@ -129,6 +130,10 @@ > #,(id #'stem #'% #'stem) > #,(id #'stem #'make- #'stem) > #,(id #'stem #'stem #'?) > + (location configuration-location > + (default (and=3D> (current-source-location) > + source-properties->location)) > + (innate)) What about calling the field =E2=80=98%location=E2=80=99 instead? That wou= ld avoid the collision with the other =E2=80=98location=E2=80=99 field and it should be = fine because it=E2=80=99s not a field we manually set anyway. Also, instead of =E2=80=98configuration-location=E2=80=99, shouldn=E2=80=99= t it be (id #'stem #'-location) ? That will avoid ending up with one =E2=80=98configuration-location=E2=80= =99 binding for each record type. Thanks, Ludo=E2=80=99.