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