libvirt: make it build on darwin
Not sure if it works, but it no longer fails miserably at build time
This commit is contained in:
parent
50a00101c1
commit
6878b2b21d
@ -2,6 +2,7 @@
|
||||
, iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext
|
||||
, libtasn1, ebtables, libgcrypt, yajl, makeWrapper, pmutils, libcap_ng
|
||||
, dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages
|
||||
, curl, libiconv, gmp
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -14,25 +15,39 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
pkgconfig libxml2 gnutls devicemapper perl python readline lvm2
|
||||
utillinux udev libpciaccess gettext libtasn1 libgcrypt yajl makeWrapper
|
||||
libcap_ng libnl libxslt xhtml1 perlPackages.XMLXPath numad numactl
|
||||
pkgconfig libxml2 gnutls perl python readline
|
||||
gettext libtasn1 libgcrypt yajl makeWrapper
|
||||
libxslt xhtml1 perlPackages.XMLXPath curl
|
||||
] ++ stdenv.lib.optionals stdenv.isLinux [
|
||||
libpciaccess devicemapper lvm2 utillinux udev libcap_ng libnl numad numactl
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
libiconv gmp
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${udev}/sbin:${dnsmasq}/bin:$PATH
|
||||
preConfigure = stdenv.lib.optionalString stdenv.isLinux ''
|
||||
PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${udev}/sbin:$PATH
|
||||
substituteInPlace configure --replace 'as_dummy="/bin:/usr/bin:/usr/sbin"' 'as_dummy="${numad}/bin"'
|
||||
'' + ''
|
||||
PATH=${dnsmasq}/bin:$PATH
|
||||
patchShebangs . # fixes /usr/bin/python references
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"--with-init-script=redhat"
|
||||
"--with-libpcap"
|
||||
"--with-vmware"
|
||||
"--with-vbox"
|
||||
"--with-test"
|
||||
"--with-esx"
|
||||
"--with-remote"
|
||||
] ++ stdenv.lib.optionals stdenv.isLinux [
|
||||
"--with-numad"
|
||||
"--with-macvtap"
|
||||
"--with-virtualport"
|
||||
"--with-libpcap"
|
||||
"--with-numad"
|
||||
"--with-init-script=redhat"
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
"--with-init-script=none"
|
||||
];
|
||||
|
||||
installFlags = [
|
||||
@ -44,6 +59,7 @@ stdenv.mkDerivation rec {
|
||||
sed -i 's/ON_SHUTDOWN=suspend/ON_SHUTDOWN=''${ON_SHUTDOWN:-suspend}/' $out/libexec/libvirt-guests.sh
|
||||
substituteInPlace $out/libexec/libvirt-guests.sh \
|
||||
--replace "$out/bin" "${gettext}/bin"
|
||||
'' + stdenv.lib.optionalString stdenv.isLinux ''
|
||||
wrapProgram $out/sbin/libvirtd \
|
||||
--prefix PATH : ${iptables}/sbin:${iproute}/sbin:${pmutils}/bin:${numad}/bin:${numactl}/bin
|
||||
'';
|
||||
@ -60,6 +76,6 @@ stdenv.mkDerivation rec {
|
||||
versions of Linux (and other OSes)
|
||||
'';
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user