From 50c17ddd9e2983d71c125d89b422fd20fca476e1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 19 Nov 2022 17:04:46 +0100 Subject: 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. --- gnu/services/lightdm.scm | 20 ++++++++++---------- 1 file 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))) -- cgit v1.2.3