diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2024-03-27 05:22:31 +0100 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2024-03-27 05:22:31 +0100 |
commit | 4c70f5242befb5786cb437559a4d8701e630bd29 (patch) | |
tree | dbbff437004184d50c9a53f6c4897a85361aceb1 /gnu/services.scm | |
parent | a9e65e0341d5045e425e3cf8d741a3d13cfa35a1 (diff) | |
parent | 929ddec8f4a181be653152c7436581c2adc54eee (diff) | |
download | guix-4c70f5242befb5786cb437559a4d8701e630bd29.tar.gz guix-4c70f5242befb5786cb437559a4d8701e630bd29.zip |
Merge branch 'master' into emacs-team
Diffstat (limited to 'gnu/services.scm')
-rw-r--r-- | gnu/services.scm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gnu/services.scm b/gnu/services.scm index 59481af10f..88593e8091 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015-2023 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015-2024 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020, 2021 Ricardo Wurmus <rekado@elephly.net> @@ -91,6 +91,8 @@ for-home for-home? + validate-service-list + service-error? missing-value-service-error? missing-value-service-error-type @@ -1271,4 +1273,19 @@ Home service rather than a System service." (syntax-parameterize ((for-home? (identifier-syntax #t))) exp ...)) +(define-with-syntax-properties (validate-service-list (value properties)) + (%validate-service-list value properties)) + +(define (%validate-service-list value properties) + (match value + (((? service?) ...) value) + (_ + (raise + (make-compound-condition + (condition + (&error-location + (location (source-properties->location properties)))) + (formatted-message + (G_ "'services' field must contain a list of services"))))))) + ;;; services.scm ends here. |