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 }) 102 ]; 103 104 preConfigure = '' 105 unset CPP # intereferes with dependency calculation 106 # this script isn't marked as executable b/c it's indirectly used by meson. Needed to patch its shebang ··· 119 "--enable-docs" 120 "--enable-tools" 121 "--enable-guest-agent" 122 "--sysconfdir=/etc" 123 ] 124 ++ optional numaSupport "--enable-numa"
··· 101 }) 102 ]; 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 + 110 preConfigure = '' 111 unset CPP # intereferes with dependency calculation 112 # this script isn't marked as executable b/c it's indirectly used by meson. Needed to patch its shebang ··· 125 "--enable-docs" 126 "--enable-tools" 127 "--enable-guest-agent" 128 + "--localstatedir=/var" 129 "--sysconfdir=/etc" 130 ] 131 ++ optional numaSupport "--enable-numa"