aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-11-19 17:04:46 +0100
committerLudovic Courtès <ludo@gnu.org>2022-11-19 19:54:14 +0100
commit50c17ddd9e2983d71c125d89b422fd20fca476e1 (patch)
tree71618b461bb3a6bccda28f2ab709272766abcd7c
parent85f4d87b8154238480dc176b77b8c54dde84e1c4 (diff)
downloadguix-50c17ddd9e2983d71c125d89b422fd20fca476e1.tar.gz
guix-50c17ddd9e2983d71c125d89b422fd20fca476e1.zip
services: lightdm: Do not use GOOPS.
There's an unwritten policy to not use GOOPS in Guix. * gnu/services/lightdm.scm (strip-class-name-brackets): Rename to... (strip-record-type-name-brackets): ... this. (config->name): Adjust accordingly and use 'record-type-name' instead of 'class-name'. (list-of-greeter-configurations?): Likewise.
-rw-r--r--gnu/services/lightdm.scm20
1 files changed, 10 insertions, 10 deletions
diff --git a/gnu/services/lightdm.scm b/gnu/services/lightdm.scm
index dfb14d7723..7e3864fec2 100644
--- a/gnu/services/lightdm.scm
+++ b/gnu/services/lightdm.scm
@@ -40,7 +40,6 @@
#:use-module (guix records)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
- #:use-module (oop goops)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (lightdm-seat-configuration
@@ -177,17 +176,18 @@ Provider Interface (AT-SPI).")
"Extra configuration values to append to the LightDM GTK Greeter
configuration file."))
-(define (strip-class-name-brackets name)
- "Remove the '<<' and '>>' brackets from NAME, a symbol."
- (let ((name* (symbol->string name)))
- (if (and (string-prefix? "<<" name*)
- (string-suffix? ">>" name*))
- (string->symbol (string-drop (string-drop-right name* 2) 2))
- (error "unexpected class name" name*))))
+(define (strip-record-type-name-brackets name)
+ "Remove the '<' and '>' brackets from NAME, a symbol."
+ (let ((name (symbol->string name)))
+ (if (and (string-prefix? "<" name)
+ (string-suffix? ">" name))
+ (string->symbol (string-drop (string-drop-right name 1) 1))
+ (error "unexpected record type name" name))))
(define (config->name config)
"Return the constructor name (a symbol) from CONFIG."
- (strip-class-name-brackets (class-name (class-of config))))
+ (strip-record-type-name-brackets
+ (record-type-name (struct-vtable config))))
(define (greeter-configuration->greeter-fields config)
"Return the fields of CONFIG, a greeter configuration."
@@ -323,7 +323,7 @@ a symbol."
(define (list-of-greeter-configurations? greeter-configs)
(and ((list-of greeter-configuration?) greeter-configs)
;; Greeter configurations must also not be provided more than once.
- (let* ((types (map (cut (compose class-name class-of) <>)
+ (let* ((types (map (compose record-type-name struct-vtable)
greeter-configs))
(dupes (filter (lambda (type)
(< 1 (count (cut eq? type <>) types)))