@@ -101,6 +101,12 @@ stdenv.mkDerivation rec {
101101 })
102102 ];
103103
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+
104110 preConfigure = ''
105111 unset CPP # intereferes with dependency calculation
106112 # this script isn't marked as executable b/c it's indirectly used by meson. Needed to patch its shebang
@@ -119,6 +125,7 @@ stdenv.mkDerivation rec {
119125 "--enable-docs"
120126 "--enable-tools"
121127 "--enable-guest-agent"
128+ "--localstatedir=/var"
122129 "--sysconfdir=/etc"
123130 ]
124131 ++ optional numaSupport "--enable-numa"