diff options
author | Dan Rabinowitz <djr@DanielRabinowitz.com> | 2024-04-02 11:02:47 -0600 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-04-03 13:33:17 +0200 |
commit | 0eed0f1309446e65bdedb3495a16befe06b926ba (patch) | |
tree | dfaa97fb1ba9be0df4412e30bbfa3386c60b61b1 | |
parent | 9ce47d84cddede3ee9330f63f458e60e267f939c (diff) |
libvirt: Use valid runstatedir for Darwin
Some use cases require libvirtd to be run as root on MacOS due to https://gitlab.com/qemu-project/qemu/-/issues/465 Running libvirtd as root uses runstatedir for the pid, but /run is not a valid or standard path on MacOS.
-rw-r--r-- | pkgs/development/libraries/libvirt/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 72d94ee32989c..f82c5d18fb9d6 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -271,7 +271,7 @@ stdenv.mkDerivation rec { "--sysconfdir=/var/lib" (cfg "install_prefix" (placeholder "out")) (cfg "localstatedir" "/var") - (cfg "runstatedir" "/run") + (cfg "runstatedir" (if isDarwin then "/var/run" else "/run")) (cfg "init_script" (if isDarwin then "none" else "systemd")) (cfg "qemu_datadir" (lib.optionalString isDarwin "${qemu}/share/qemu")) |