From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#33078: Attempt to build my GuixSD system now fails Date: Fri, 19 Oct 2018 16:00:35 +0200 Message-ID: <87y3auf33w.fsf@gnu.org> References: <87d0s8nyvi.fsf@netris.org> <87woqgfgb8.fsf@fastmail.com> <87tvlkfdl1.fsf@fastmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDVKv-0005wQ-QA for bug-guix@gnu.org; Fri, 19 Oct 2018 10:01:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDVKo-0004Ub-5H for bug-guix@gnu.org; Fri, 19 Oct 2018 10:01:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDVKo-0004UV-0l for bug-guix@gnu.org; Fri, 19 Oct 2018 10:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gDVKn-0002IH-Uz for bug-guix@gnu.org; Fri, 19 Oct 2018 10:01:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87tvlkfdl1.fsf@fastmail.com> (Marius Bakke's message of "Wed, 17 Oct 2018 23:49:46 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Marius Bakke Cc: 33078@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Marius Bakke skribis: > Marius Bakke writes: > >> Mark H Weaver 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? > > [...] >=20=20=20 >> (define wpa-supplicant-service-type >> - (let ((config->package >> - (match-lambda >> - (($ wpa-supplicant) >> - (list wpa-supplicant))))) >> - (service-type (name 'wpa-supplicant) >> - (extensions >> - (list (service-extension shepherd-root-service-type >> - wpa-supplicant-shepherd-ser= vice) >> - (service-extension dbus-root-service-type conf= ig->package) >> - (service-extension profile-service-type config= ->package))) >> - (description "Run the WPA Supplicant daemon, a servic= e that >> + (lambda* (#:optional wpa-supplicant-package) ;deprecated >> + (let ((package >> + (if wpa-supplicant-package >> + wpa-supplicant-package >> + (match-lambda >> + (($ 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? =E2=80=98wpa-supplicant-service-type=E2=80=99 must remain a = record, so the above cannot work. Maybe this? --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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) - (list wpa-supplicant))))) + (list wpa-supplicant)) + ((? package? package) + (list package))))) (service-type (name 'wpa-supplicant) (extensions (list (service-extension shepherd-root-service-type --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 DQpIVEgsDQpMdWRv4oCZLg0K --=-=-=--