2011-02-25 13:24:41 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libxml2, gnutls, devicemapper, perl, python
|
2013-07-24 12:41:20 +00:00
|
|
|
, iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext
|
2013-09-14 08:35:31 +00:00
|
|
|
, libtasn1, ebtables, libgcrypt, yajl, makeWrapper, pmutils, libcap_ng
|
2013-11-09 15:11:47 +00:00
|
|
|
, dnsmasq
|
2011-03-14 14:46:41 +00:00
|
|
|
}:
|
2010-01-27 12:12:35 +00:00
|
|
|
|
2014-03-11 17:27:09 +00:00
|
|
|
let version = "1.2.2"; 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";
|
2014-03-11 17:27:09 +00:00
|
|
|
sha256 = "1hxvgh2fp2fk3wva7fnbz2pk6g5217wrmf9xwikiphn50zipg0x4";
|
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
|
2013-07-24 12:41:20 +00:00
|
|
|
utillinux udev libpciaccess gettext libtasn1 libgcrypt yajl makeWrapper
|
2013-09-14 08:35:31 +00:00
|
|
|
libcap_ng
|
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
|
|
|
''
|
2013-11-09 15:11:47 +00:00
|
|
|
PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${udev}/sbin:${dnsmasq}/bin:$PATH
|
2011-06-08 11:15:27 +00:00
|
|
|
patchShebangs . # fixes /usr/bin/python references
|
2011-02-24 13:36:18 +00:00
|
|
|
'';
|
|
|
|
|
2012-01-18 19:47:39 +00:00
|
|
|
configureFlags = "--localstatedir=/var --sysconfdir=/etc --with-init-script=redhat --without-macvtap";
|
2011-02-25 13:24:41 +00:00
|
|
|
|
2011-03-31 22:09:07 +00:00
|
|
|
installFlags = "localstatedir=$(TMPDIR)/var sysconfdir=$(out)/etc";
|
2010-01-27 12:12:35 +00:00
|
|
|
|
2011-02-25 15:56:10 +00:00
|
|
|
postInstall =
|
|
|
|
''
|
2013-03-28 17:04:49 +00:00
|
|
|
substituteInPlace $out/libexec/libvirt-guests.sh \
|
2011-02-25 15:56:10 +00:00
|
|
|
--replace "$out/bin" "${gettext}/bin"
|
2013-07-24 12:41:20 +00:00
|
|
|
wrapProgram $out/sbin/libvirtd \
|
|
|
|
--prefix PATH : ${iptables}/sbin:${iproute}/sbin:${pmutils}/bin
|
2011-02-25 15:56:10 +00:00
|
|
|
'';
|
|
|
|
|
2012-04-19 21:40:07 +00:00
|
|
|
enableParallelBuilding = true;
|
2012-05-06 22:39:39 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-fno-stack-protector";
|
2012-04-19 21:40:07 +00:00
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|