qemu: set localstatedir

Otherwise qemu-qa, qemu-pr-helper, and virtiofsd, try to write to
$out/var at runtime.

Fixes: https://github.com/NixOS/nixpkgs/issues/113909
Fixes: https://github.com/NixOS/nixpkgs/pull/112886

+7
+7
pkgs/applications/virtualization/qemu/default.nix
··· 101 101 }) 102 102 ]; 103 103 104 + # Otherwise tries to ensure /var/run exists. 105 + postPatch = '' 106 + sed -i "/install_subdir('run', install_dir: get_option('localstatedir'))/d" \ 107 + qga/meson.build 108 + ''; 109 + 104 110 preConfigure = '' 105 111 unset CPP # intereferes with dependency calculation 106 112 # this script isn't marked as executable b/c it's indirectly used by meson. Needed to patch its shebang ··· 119 125 "--enable-docs" 120 126 "--enable-tools" 121 127 "--enable-guest-agent" 128 + "--localstatedir=/var" 122 129 "--sysconfdir=/etc" 123 130 ] 124 131 ++ optional numaSupport "--enable-numa"