summary refs log tree commit diff
path: root/pkgs/development/libraries/libvirt
diff options
context:
space:
mode:
authorVolth <volth@webmaster.ms>2017-08-02 01:18:57 +0000
committerVolth <volth@webmaster.ms>2017-08-03 13:53:57 +0000
commit84a6a3683b7e10122d7a2c00a150cc1b1c02c4bb (patch)
treef8667a7ca3b6be9a2ee9f5fc1a07bd1d89e04979 /pkgs/development/libraries/libvirt
parentf0f55ac6cdad02d4d2682148994ef9456458bba4 (diff)
downloadnixlib-84a6a3683b7e10122d7a2c00a150cc1b1c02c4bb.tar
nixlib-84a6a3683b7e10122d7a2c00a150cc1b1c02c4bb.tar.gz
nixlib-84a6a3683b7e10122d7a2c00a150cc1b1c02c4bb.tar.bz2
nixlib-84a6a3683b7e10122d7a2c00a150cc1b1c02c4bb.tar.lz
nixlib-84a6a3683b7e10122d7a2c00a150cc1b1c02c4bb.tar.xz
nixlib-84a6a3683b7e10122d7a2c00a150cc1b1c02c4bb.tar.zst
nixlib-84a6a3683b7e10122d7a2c00a150cc1b1c02c4bb.zip
libvirt: 3.5.0 -> 3.6.0
Diffstat (limited to 'pkgs/development/libraries/libvirt')
-rw-r--r--pkgs/development/libraries/libvirt/default.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix
index 805a4c0b63db..b3066c4eed82 100644
--- a/pkgs/development/libraries/libvirt/default.nix
+++ b/pkgs/development/libraries/libvirt/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, fetchpatch
 , pkgconfig, makeWrapper
-, libxml2, gnutls, devicemapper, perl, python2, attr
+, coreutils, libxml2, gnutls, devicemapper, perl, python2, attr
 , iproute, iptables, readline, lvm2, utillinux, systemd, libpciaccess, gettext
 , libtasn1, ebtables, libgcrypt, yajl, pmutils, libcap_ng, libapparmor
 , dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages
@@ -12,11 +12,11 @@ with stdenv.lib;
 # if you update, also bump pythonPackages.libvirt or it will break
 stdenv.mkDerivation rec {
   name = "libvirt-${version}";
-  version = "3.5.0";
+  version = "3.6.0";
 
   src = fetchurl {
     url = "http://libvirt.org/sources/${name}.tar.xz";
-    sha256 = "05mm4xdw6g960rwvc9189nhxpm1vrilnmpl4h4m1lha11pivlqr9";
+    sha256 = "0gcyql5dp6j370kvik9hjhxirrg89m7l1q52yq0g75h7jpv9fb1s";
   };
 
   patches = [ ./build-on-bsd.patch ];
@@ -36,6 +36,13 @@ stdenv.mkDerivation rec {
     PATH=${stdenv.lib.makeBinPath [ iproute iptables ebtables lvm2 systemd ]}:$PATH
     substituteInPlace configure \
       --replace 'as_dummy="/bin:/usr/bin:/usr/sbin"' 'as_dummy="${numad}/bin"'
+
+    # the path to qemu-kvm will be stored in VM's .xml and .save files
+    # do not use "''${qemu_kvm}/bin/qemu-kvm" to avoid bound VMs to particular qemu derivations
+    substituteInPlace src/qemu/qemu_capabilities.c \
+      --replace '"/usr/libexec/qemu-kvm"' '"/run/libvirt/nix-emulators/${if stdenv.isAarch64 then "qemu-system-aarch64" else "qemu-kvm"}"'
+    substituteInPlace src/lxc/lxc_conf.c \
+      --replace 'lxc_path,' '"/run/libvirt/nix-emulators/libvirt_lxc",'
   '' + ''
     PATH=${dnsmasq}/bin:$PATH
     patchShebangs . # fixes /usr/bin/python references
@@ -77,6 +84,8 @@ stdenv.mkDerivation rec {
       --replace "lock/subsys" "lock"
     sed -e "/gettext\.sh/a \\\n# Added in nixpkgs:\ngettext() { \"${gettext}/bin/gettext\" \"\$@\"; }" \
         -i "$out/libexec/libvirt-guests.sh"
+
+    substituteInPlace $out/lib/systemd/system/libvirtd.service --replace /bin/kill ${coreutils}/bin/kill
   '' + optionalString stdenv.isLinux ''
     rm $out/lib/systemd/system/{virtlockd,virtlogd}.*
     wrapProgram $out/sbin/libvirtd \