bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33078: Attempt to build my GuixSD system now fails


From: Ludovic Courtès
Subject: bug#33078: Attempt to build my GuixSD system now fails
Date: Fri, 19 Oct 2018 16:00:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Marius Bakke <address@hidden> skribis:

> Marius Bakke <address@hidden> writes:
>
>> Mark H Weaver <address@hidden> writes:
>>
>>>   (services (cons* (console-keymap-service keymap)
>>>                    ;;(xfce-desktop-service)
>>>                    (gnome-desktop-service)
>>>                    (service network-manager-service-type
>>>                             (network-manager-configuration))
>>>                    (service wpa-supplicant-service-type wpa-supplicant)
>>
>> To adapt to the new interface, this should be changed to:
>>
>> (service wpa-supplicant-service-type)
>>
>> ...though it would be good to have backwards compatibility here.  WDYT
>> of this approach?
>
> [...]
>   
>>  (define wpa-supplicant-service-type
>> -  (let ((config->package
>> -         (match-lambda
>> -           (($ <wpa-supplicant-configuration> wpa-supplicant)
>> -            (list wpa-supplicant)))))
>> -    (service-type (name 'wpa-supplicant)
>> -                  (extensions
>> -                   (list (service-extension shepherd-root-service-type
>> -                                            wpa-supplicant-shepherd-service)
>> -                         (service-extension dbus-root-service-type 
>> config->package)
>> -                         (service-extension profile-service-type 
>> config->package)))
>> -                  (description "Run the WPA Supplicant daemon, a service 
>> that
>> +  (lambda* (#:optional wpa-supplicant-package)      ;deprecated
>> +    (let ((package
>> +           (if wpa-supplicant-package
>> +               wpa-supplicant-package
>> +               (match-lambda
>> +                 (($ <wpa-supplicant-configuration> wpa-supplicant)
>> +                  (list wpa-supplicant))))))
>
> Derp, this obviously won't work.
>
> I've tried various incarnations to match a package object in the
> match-lambda with little success.  Suggestions?

‘wpa-supplicant-service-type’ must remain a <service-type> record, so
the above cannot work.

Maybe this?

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 61a0e975c..391c6ec59 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1077,7 +1077,9 @@ networking."))))
   (let ((config->package
          (match-lambda
            (($ <wpa-supplicant-configuration> wpa-supplicant)
-            (list wpa-supplicant)))))
+            (list wpa-supplicant))
+           ((? package? package)
+            (list package)))))
     (service-type (name 'wpa-supplicant)
                   (extensions
                    (list (service-extension shepherd-root-service-type
HTH,
Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]