From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:40309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guluu-0002hh-10 for guix-patches@gnu.org; Fri, 15 Feb 2019 17:25:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gulus-0000fG-UE for guix-patches@gnu.org; Fri, 15 Feb 2019 17:25:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50606) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guluq-0000dn-MY for guix-patches@gnu.org; Fri, 15 Feb 2019 17:25:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1guluo-0006dk-Jr for guix-patches@gnu.org; Fri, 15 Feb 2019 17:25:04 -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> <87d0poci1q.fsf@gnu.org> Date: Fri, 15 Feb 2019 23:24:52 +0100 In-Reply-To: <87d0poci1q.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 26 Dec 2018 18:30:09 +0100") Message-ID: <87k1i0itaj.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 Hi Oleg, A friendly ping! :-) Ludo=E2=80=99. Ludovic Court=C3=A8s skribis: > 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 w= ould avoid the > collision with the other =E2=80=98location=E2=80=99 field and it should b= e 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= =99t 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.