GNU bug report logs - #77266
[PATCH] gnu: Merge xorg configurations when extending.

Previous Next

Package: guix-patches;

Reported by: Ian Eure <ian <at> retrospec.tv>

Date: Wed, 26 Mar 2025 04:25:02 UTC

Severity: normal

Tags: patch

Done: Ian Eure <ian <at> retrospec.tv>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ian Eure <ian <at> retrospec.tv>
To: Ludovic Courtès <ludo <at> chbouib.org>
Cc: 77266 <at> debbugs.gnu.org
Subject: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending.
Date: Tue, 15 Apr 2025 18:08:10 -0700
Ludovic Courtès <ludo <at> chbouib.org> writes:

> Hello Ian,
>
> Ian Eure <ian <at> retrospec.tv> writes:
>
>> +(define %xorg-keyboard-service
>> +  (simple-service
>> +   'xorg-keyboard
>> +   gdm-service-type
>> +   (xorg-configuration (keyboard-layout keyboard-layouut))))
>
> Could you fix the indentation and add short comments above the
> definitions?

Definitely.

>> +(operating-system
>> +  (services
>> +   (cons*
>> +    (service gdm-service-type)
>> +    %xorg-intel-service
>
> Rather:
>
>   (append (list (service gdm-service-type)
>                 %xorg-intel-service
>                 …)
>           @dots{})

Can make these changes, but I’m curious why (append (list ...) 
...) is preferred over cons*.  I default to the latter, because I 
like the removal of the extra level of indent.

> Something I had overlooked: this assumes that elements of this 
> list can
> be compared with ‘equal?’.  Typically, these are <file-append> 
> records
> that refer to <package> records, and those cannot be usefully 
> compared
> with ‘equal?’ (it’s effectively equivalent to ‘eq?’ in the case 
> of
> <package> records, but more expensive).
>
> So, what about removing ‘delete-duplicates’ from here, and 
> instead…
>
>>  (define (xorg-configuration->file config)
>>    "Compute an Xorg configuration file corresponding to CONFIG, 
>>    an
>
> … adding ‘delete-duplicates’ calls in here, on the build side.

Good catch, makes sense to me.  Will send a v3.

Thanks,
 -- Ian




This bug report was last modified 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.