From f5430786552a147b005b069f63f002816e397c19 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Feb 2011 15:56:10 +0000 Subject: [PATCH] * Install the libvirt-guests boot script for saving/restoring VMs across host reboots. svn path=/nixpkgs/trunk/; revision=26120 --- pkgs/development/libraries/libvirt/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index aa080f39875..e5429bf0995 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, libxml2, gnutls, devicemapper, perl, python -, iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess }: +, iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext }: let version = "0.8.8"; in @@ -13,7 +13,7 @@ stdenv.mkDerivation { buildInputs = [ pkgconfig libxml2 gnutls devicemapper perl python readline lvm2 - utillinux udev libpciaccess + utillinux udev libpciaccess gettext ]; preConfigure = @@ -21,10 +21,16 @@ stdenv.mkDerivation { PATH=${iproute}/sbin:${iptables}/sbin:${lvm2}/sbin:${udev}/sbin:$PATH ''; - configureFlags = "--localstatedir=/var"; + configureFlags = "--localstatedir=/var --with-init-script=redhat"; installFlags = "localstatedir=$(TMPDIR)/var"; + postInstall = + '' + substituteInPlace $out/etc/rc.d/init.d/libvirt-guests \ + --replace "$out/bin" "${gettext}/bin" + ''; + meta = { homepage = http://libvirt.org/; description = "A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes).";