diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-02-10 20:48:54 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-03-29 17:19:06 +0000 |
commit | 8e71416e5d4306c3800133ca6dc2ad4469480b90 (patch) | |
tree | 081d83f56c564e644c9e1de558793971bb7f1c4f | |
parent | c2b66f270221c50d4dfee888ce92ed0e512300a2 (diff) |
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
-rw-r--r-- | pkgs/applications/virtualization/qemu/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 84604c65579f8..c04d3b3394522 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -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" |