GNU bug report logs -
#33836
[PATCH 0/2] location in define-configuration
Previous Next
Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Sat, 22 Dec 2018 20:40:02 UTC
Severity: normal
Tags: fixed, patch
Done: Oleg Pykhalov <go.wigust <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 33836 <at> debbugs.gnu.org (full text, mbox):
Hi Oleg,
A friendly ping! :-)
Ludo’.
Ludovic Courtès <ludo <at> gnu.org> skribis:
> Hello,
>
> Oleg Pykhalov <go.wigust <at> gmail.com> 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=> (current-source-location)
>> + source-properties->location))
>> + (innate))
>
> What about calling the field ‘%location’ instead? That would avoid the
> collision with the other ‘location’ field and it should be fine because
> it’s not a field we manually set anyway.
>
> Also, instead of ‘configuration-location’, shouldn’t it be
>
> (id #'stem #'-location)
>
> ? That will avoid ending up with one ‘configuration-location’ binding
> for each record type.
>
> Thanks,
> Ludo’.
This bug report was last modified 6 years and 70 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.