aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/configuration.scm
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2018-12-22 23:30:40 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2019-03-10 21:32:38 +0300
commitd132d9f96ba34bca58b18e293e03b393054fd962 (patch)
tree41b5bcf30768209cbbe16c9aa1724d07474dd5e2 /gnu/services/configuration.scm
parent41ce92501b53caa1dcf89fa81aed71dbf1f85d34 (diff)
downloadguix-d132d9f96ba34bca58b18e293e03b393054fd962.tar
guix-d132d9f96ba34bca58b18e293e03b393054fd962.tar.gz
services: configuration: Add '%location'.
* gnu/services/configuration.scm (define-configuration): Add '%location'.
Diffstat (limited to 'gnu/services/configuration.scm')
-rw-r--r--gnu/services/configuration.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
index 707944cbe0..90f12a8d39 100644
--- 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 #,(id #'stem #'-location)
+ (default (and=> (current-source-location)
+ source-properties->location))
+ (innate))
(field field-getter (default def))
...)
(define #,(id #'stem #'stem #'-fields)