From 9e12da319b779d1c7f3d46ad2fd4025d4ffc228f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Jul 2020 01:31:23 +0200 Subject: system: Add 'location' field to . This allows error messages to include source location info. * gnu/system.scm ()[location]: New field. --- gnu/system.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/system.scm b/gnu/system.scm index f915057f36..e7f85e4358 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -118,6 +118,7 @@ (define-module (gnu system) operating-system-sudoers-file operating-system-swap-devices operating-system-kernel-loadable-modules + operating-system-location operating-system-derivation operating-system-profile @@ -255,7 +256,12 @@ (define-record-type* operating-system (default %setuid-programs)) ; list of string-valued gexps (sudoers-file operating-system-sudoers-file ; file-like - (default %sudoers-specification))) + (default %sudoers-specification)) + + (location operating-system-location ; + (default (and=> (current-source-location) + source-properties->location)) + (innate))) (define (operating-system-kernel-arguments os root-device) "Return all the kernel arguments, including the ones not specified -- cgit v1.2.3