From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: libvirt with modified QEMU and OVMF Date: Sat, 08 Sep 2018 13:22:37 +0200 Message-ID: <87efe4grnm.fsf@gnu.org> References: <129c5140-eb4c-27df-fe43-6f7cbd423edd@larf.space> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fybK9-00083P-8j for guix-devel@gnu.org; Sat, 08 Sep 2018 07:22:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fybK5-0004rf-PL for guix-devel@gnu.org; Sat, 08 Sep 2018 07:22:43 -0400 In-Reply-To: <129c5140-eb4c-27df-fe43-6f7cbd423edd@larf.space> ("Lars \=\?utf-8\?Q\?B\=C3\=B6ckel\=22's\?\= message of "Sun, 2 Sep 2018 01:16:39 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Lars =?utf-8?Q?B=C3=B6ckel?= Cc: guix-devel@gnu.org Hi Lars, Lars B=C3=B6ckel skribis: > 2) Using a modified QEMU with libvirt. A modified QEMU could help > sometimes. A way to specify which QEMU package to use would be helpful > to resolve issues with newer qemu versions or patches which are not > upstream. While in NixOS you could add patches like this > > =C2=A0=C2=A0=C2=A0 nixpkgs.config.packageOverrides =3D pkgs: rec { > =C2=A0=C2=A0=C2=A0 qemu =3D pkgs.qemu.overrideAttrs (attrs:{ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 patches =3D (lib.filter (x: ! (lib.hasSuff= ix > "fix-hda-recording.patch" (builtins.toString x)))=C2=A0 attrs.patches) ++= [ > /path/to/qemu.patch=C2=A0=C2=A0=C2=A0 ]; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > =C2=A0=C2=A0 =C2=A0); > =C2=A0 }; > > to the QEMU package, i don't think this is possible in GuixSD. As G=C3=A1bor suggested, you would do it along these lines: (define qemu-patched (package (inherit qemu) =E2=80=A6)) (define custom-libvirt (package (inherit libvirt) (inputs `(("qemu" ,qemu-patched) ,@(alist-delete "qemu" (package-inputs libvirt)))))) (operating-system ;; =E2=80=A6 (services (cons (service libvirt-service-type (libvirt-configuration (libvirt custom-libvirt))) %base-services))) It=E2=80=99s not equivalent to the above Nix snippet because it only affect= s the libvirt service, but it addresses this particular need. HTH, Ludo=E2=80=99.