2011-02-25 13:24:41 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libxml2, gnutls, devicemapper, perl, python
|
2011-03-14 14:46:41 +00:00
|
|
|
, iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext
|
2011-03-31 13:20:49 +00:00
|
|
|
, libtasn1, ebtables
|
2011-03-14 14:46:41 +00:00
|
|
|
}:
|
2010-01-27 12:12:35 +00:00
|
|
|
|
2011-03-31 13:20:49 +00:00
|
|
|
let version = "0.9.0-rc2"; in
|
2010-01-27 12:12:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "libvirt-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://libvirt.org/sources/libvirt-${version}.tar.gz";
|
2011-03-31 13:20:49 +00:00
|
|
|
sha256 = "1blfx5rh8in5qn91944fz1mxv8jyigac4br8qmh7hvrw3wj2wrl9";
|
2010-01-27 12:12:35 +00:00
|
|
|
};
|
|
|
|
|
2011-02-25 13:24:41 +00:00
|
|
|
buildInputs =
|
|
|
|
[ pkgconfig libxml2 gnutls devicemapper perl python readline lvm2
|
2011-03-14 14:46:41 +00:00
|
|
|
utillinux udev libpciaccess gettext libtasn1
|
2011-02-25 13:24:41 +00:00
|
|
|
];
|
2011-02-24 13:36:18 +00:00
|
|
|
|
2011-02-25 13:24:41 +00:00
|
|
|
preConfigure =
|
2011-02-24 13:36:18 +00:00
|
|
|
''
|
2011-03-31 13:20:49 +00:00
|
|
|
PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${udev}/sbin:$PATH
|
2011-02-24 13:36:18 +00:00
|
|
|
'';
|
|
|
|
|
2011-02-25 15:56:10 +00:00
|
|
|
configureFlags = "--localstatedir=/var --with-init-script=redhat";
|
2011-02-25 13:24:41 +00:00
|
|
|
|
2011-02-24 13:36:18 +00:00
|
|
|
installFlags = "localstatedir=$(TMPDIR)/var";
|
2010-01-27 12:12:35 +00:00
|
|
|
|
2011-02-25 15:56:10 +00:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
substituteInPlace $out/etc/rc.d/init.d/libvirt-guests \
|
|
|
|
--replace "$out/bin" "${gettext}/bin"
|
|
|
|
'';
|
|
|
|
|
2010-01-27 12:12:35 +00:00
|
|
|
meta = {
|
|
|
|
homepage = http://libvirt.org/;
|
2011-03-14 14:46:41 +00:00
|
|
|
description = "A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes)";
|
2010-01-27 12:12:35 +00:00
|
|
|
license = "LGPLv2+";
|
2011-02-24 11:59:30 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2010-01-27 12:12:35 +00:00
|
|
|
};
|
|
|
|
}
|