From 9604aba3f690a1007b5b0244fcc92eb94fecfe5f Mon Sep 17 00:00:00 2001 From: Michael Adler Date: Fri, 28 Jun 2024 14:00:48 +0200 Subject: [PATCH] quickemu: fix Samba shares This makes it possible to share your home dir with a Windows guest. * use `qemu_full` for the correct smbd path; the fallback path `/usr/sbin/smbd` fails on NixOS [1] * make the `smbd` binary available to quickemu, enabling it to start qemu with Samba support [2] [1] https://github.com/qemu/qemu/blob/28b8a57ad63670aa0ce90334523dc552b13b4336/meson.build#L2217 [2] https://github.com/quickemu-project/quickemu/blob/626591bca87e47c545d8fff9a9be0be24f26c3d8/quickemu#L1083 --- pkgs/by-name/qu/quickemu/package.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/qu/quickemu/package.nix b/pkgs/by-name/qu/quickemu/package.nix index 83b44bfc388d..1f8e0cf07118 100644 --- a/pkgs/by-name/qu/quickemu/package.nix +++ b/pkgs/by-name/qu/quickemu/package.nix @@ -14,7 +14,7 @@ pciutils, procps, python3, - qemu, + qemu_full, socat, spice-gtk, swtpm, @@ -42,7 +42,7 @@ let pciutils procps python3 - qemu + qemu_full socat swtpm util-linux @@ -73,6 +73,7 @@ stdenv.mkDerivation (finalAttrs: { -e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.firmware}","${OVMF.variables}" |' \ -e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \ -e 's/Icon=.*qemu.svg/Icon=qemu/' \ + -e 's,\[ -x "\$(command -v smbd)" \],true,' \ quickemu '';