3
0
Fork 0
forked from mirrors/nixpkgs

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
This commit is contained in:
Alyssa Ross 2021-02-10 20:48:54 +00:00
parent c2b66f2702
commit 8e71416e5d

View file

@ -101,6 +101,12 @@ stdenv.mkDerivation rec {
})
];
# Otherwise tries to ensure /var/run exists.
postPatch = ''
sed -i "/install_subdir('run', install_dir: get_option('localstatedir'))/d" \
qga/meson.build
'';
preConfigure = ''
unset CPP # intereferes with dependency calculation
# 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 {
"--enable-docs"
"--enable-tools"
"--enable-guest-agent"
"--localstatedir=/var"
"--sysconfdir=/etc"
]
++ optional numaSupport "--enable-numa"