services: configuration: Add '%location'.
* gnu/services/configuration.scm (define-configuration): Add '%location'.master
parent
41ce92501b
commit
d132d9f96b
|
@ -22,6 +22,7 @@
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix utils) #:select (source-properties->location))
|
||||||
#:autoload (texinfo) (texi-fragment->stexi)
|
#:autoload (texinfo) (texi-fragment->stexi)
|
||||||
#:autoload (texinfo serialize) (stexi->texi)
|
#:autoload (texinfo serialize) (stexi->texi)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
@ -129,6 +130,10 @@
|
||||||
#,(id #'stem #'% #'stem)
|
#,(id #'stem #'% #'stem)
|
||||||
#,(id #'stem #'make- #'stem)
|
#,(id #'stem #'make- #'stem)
|
||||||
#,(id #'stem #'stem #'?)
|
#,(id #'stem #'stem #'?)
|
||||||
|
(%location #,(id #'stem #'-location)
|
||||||
|
(default (and=> (current-source-location)
|
||||||
|
source-properties->location))
|
||||||
|
(innate))
|
||||||
(field field-getter (default def))
|
(field field-getter (default def))
|
||||||
...)
|
...)
|
||||||
(define #,(id #'stem #'stem #'-fields)
|
(define #,(id #'stem #'stem #'-fields)
|
||||||
|
|
Reference in New Issue