[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#33836] [PATCH 1/2] services: configuration: Add '%location'.
From: |
Oleg Pykhalov |
Subject: |
[bug#33836] [PATCH 1/2] services: configuration: Add '%location'. |
Date: |
Fri, 1 Mar 2019 01:40:00 +0300 |
* gnu/services/configuration.scm (define-configuration): Add '%location'.
---
gnu/services/configuration.scm | 5 +++++
1 file changed, 5 insertions(+)
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)
--
2.20.1