From: ludo@gnu.org (Ludovic Courtès)
To: Marius Bakke <mbakke@fastmail.com>
Cc: 33078@debbugs.gnu.org
Subject: bug#33078: Attempt to build my GuixSD system now fails
Date: Fri, 19 Oct 2018 16:00:35 +0200 [thread overview]
Message-ID: <87y3auf33w.fsf@gnu.org> (raw)
In-Reply-To: <87tvlkfdl1.fsf@fastmail.com> (Marius Bakke's message of "Wed, 17 Oct 2018 23:49:46 +0200")
[-- Attachment #1: Type: text/plain, Size: 2066 bytes --]
Hello,
Marius Bakke <mbakke@fastmail.com> skribis:
> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Mark H Weaver <mhw@netris.org> 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?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 611 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 18 bytes --]
HTH,
Ludo’.
next prev parent reply other threads:[~2018-10-19 14:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 19:42 bug#33078: Attempt to build my GuixSD system now fails Mark H Weaver
2018-10-17 19:51 ` Mark H Weaver
2018-10-17 20:50 ` Marius Bakke
2018-10-17 21:49 ` Marius Bakke
2018-10-19 14:00 ` Ludovic Courtès [this message]
2018-11-07 21:41 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3auf33w.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=33078@debbugs.gnu.org \
--cc=mbakke@fastmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).