Merge pull request #11924 from mayflower/libvirt-pcap

libvirt: fix including libpcap and add xen support
This commit is contained in:
Domen Kožar 2015-12-28 22:45:50 +01:00
commit a9159db387
8 changed files with 30 additions and 48 deletions

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, intltool, glib, libxml2, gtk3, gtkvnc, gmp { stdenv, fetchurl, pkgconfig, intltool, glib, libxml2, gtk3, gtkvnc, gmp
, libgcrypt, gnupg, cyrus_sasl, shared_mime_info, libvirt, libcap_ng, yajl , libgcrypt, gnupg, cyrus_sasl, shared_mime_info, libvirt, libcap_ng, yajl
, gsettings_desktop_schemas, makeWrapper, numactl , gsettings_desktop_schemas, makeWrapper, xen, numactl
, spiceSupport ? true, spice_gtk ? null, spice_protocol ? null, libcap ? null, gdbm ? null , spiceSupport ? true, spice_gtk ? null, spice_protocol ? null, libcap ? null, gdbm ? null
}: }:
@ -9,25 +9,20 @@ assert spiceSupport ->
with stdenv.lib; with stdenv.lib;
let sourceInfo = rec { stdenv.mkDerivation rec {
baseName="virt-viewer"; baseName = "virt-viewer";
version="2.0"; version = "2.0";
name="${baseName}-${version}"; name = "${baseName}-${version}";
url="http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz";
hash="0dylhpk5rq9jz0l1cxs50q2s74z0wingygm1m33bmnmcnny87ig9";
}; in
stdenv.mkDerivation {
inherit (sourceInfo) name version;
src = fetchurl { src = fetchurl {
url = sourceInfo.url; url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz";
sha256 = sourceInfo.hash; sha256 = "0dylhpk5rq9jz0l1cxs50q2s74z0wingygm1m33bmnmcnny87ig9";
}; };
buildInputs = [ buildInputs = [
pkgconfig intltool glib libxml2 gtk3 gtkvnc gmp libgcrypt gnupg cyrus_sasl numactl pkgconfig intltool glib libxml2 gtk3 gtkvnc gmp libgcrypt gnupg cyrus_sasl
shared_mime_info libvirt libcap_ng yajl gsettings_desktop_schemas makeWrapper shared_mime_info libvirt libcap_ng yajl gsettings_desktop_schemas makeWrapper
xen numactl
] ++ optionals spiceSupport [ spice_gtk spice_protocol libcap gdbm ]; ] ++ optionals spiceSupport [ spice_gtk spice_protocol libcap gdbm ];
postInstall = '' postInstall = ''

View File

@ -2,8 +2,8 @@
, glib, gobjectIntrospection, libxml2, gtk3, gtkvnc, libvirt, spice_gtk , glib, gobjectIntrospection, libxml2, gtk3, gtkvnc, libvirt, spice_gtk
, spice_protocol, libuuid, libsoup, libosinfo, systemd, tracker, vala , spice_protocol, libuuid, libsoup, libosinfo, systemd, tracker, vala
, libcap_ng, libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg , libcap_ng, libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg
, desktop_file_utils, mtools, cdrkit, libcdio , desktop_file_utils, mtools, cdrkit, libcdio, libgudev
, libusb, libarchive, acl , libusb, libarchive, acl, xen, numactl
}: }:
# TODO: ovirt (optional) # TODO: ovirt (optional)
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
gobjectIntrospection libxml2 gtk3 gtkvnc libvirt spice_gtk spice_protocol gobjectIntrospection libxml2 gtk3 gtkvnc libvirt spice_gtk spice_protocol
libuuid libsoup libosinfo systemd tracker vala libcap_ng libcap yajl gmp libuuid libsoup libosinfo systemd tracker vala libcap_ng libcap yajl gmp
gdbm cyrus_sasl gnome3.defaultIconTheme libusb libarchive gdbm cyrus_sasl gnome3.defaultIconTheme libusb libarchive
librsvg desktop_file_utils acl librsvg desktop_file_utils acl libgudev xen numactl
]; ];
preFixup = '' preFixup = ''

View File

@ -2,8 +2,8 @@
, glib, gobjectIntrospection, libxml2, gtk3, gtkvnc, libvirt, spice_gtk , glib, gobjectIntrospection, libxml2, gtk3, gtkvnc, libvirt, spice_gtk
, spice_protocol, libuuid, libsoup, libosinfo, systemd, tracker, vala , spice_protocol, libuuid, libsoup, libosinfo, systemd, tracker, vala
, libcap_ng, libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg , libcap_ng, libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg
, desktop_file_utils, mtools, cdrkit, libcdio , desktop_file_utils, mtools, cdrkit, libcdio, numactl, xen
, libusb, libarchive, acl , libusb, libarchive, acl, libgudev
}: }:
# TODO: ovirt (optional) # TODO: ovirt (optional)
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
gobjectIntrospection libxml2 gtk3 gtkvnc libvirt spice_gtk spice_protocol gobjectIntrospection libxml2 gtk3 gtkvnc libvirt spice_gtk spice_protocol
libuuid libsoup libosinfo systemd tracker vala libcap_ng libcap yajl gmp libuuid libsoup libosinfo systemd tracker vala libcap_ng libcap yajl gmp
gdbm cyrus_sasl gnome3.defaultIconTheme libusb libarchive gdbm cyrus_sasl gnome3.defaultIconTheme libusb libarchive
librsvg desktop_file_utils acl librsvg desktop_file_utils acl libgudev numactl xen
]; ];
preFixup = '' preFixup = ''

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, autoconf, automake, libtool, makeWrapper { stdenv, fetchurl, pkgconfig, autoconf, automake, libtool, makeWrapper
, ncurses, cpio, gperf, perl, cdrkit, flex, bison, qemu, pcre, augeas, libxml2 , ncurses, cpio, gperf, perl, cdrkit, flex, bison, qemu, pcre, augeas, libxml2
, acl, libcap, libcap_ng, libconfig, systemd, fuse, yajl, libvirt, hivex , acl, libcap, libcap_ng, libconfig, systemd, fuse, yajl, libvirt, hivex
, gmp, readline, file, libintlperl, GetoptLong, SysVirt }: , gmp, readline, file, libintlperl, GetoptLong, SysVirt, numactl, xen }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libguestfs-${version}"; name = "libguestfs-${version}";
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
makeWrapper pkgconfig autoconf automake libtool ncurses cpio gperf perl makeWrapper pkgconfig autoconf automake libtool ncurses cpio gperf perl
cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig
systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong
SysVirt SysVirt numactl xen
]; ];
configureFlags = "--disable-appliance --disable-daemon"; configureFlags = "--disable-appliance --disable-daemon";

View File

@ -3,11 +3,11 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libosinfo-0.2.11"; name = "libosinfo-0.2.12";
src = fetchurl { src = fetchurl {
url = "https://fedorahosted.org/releases/l/i/libosinfo/${name}.tar.gz"; url = "https://fedorahosted.org/releases/l/i/libosinfo/${name}.tar.gz";
sha256 = "0889zvidhmpk3nd7c1xhh3fkk9i014dkr6zdlddh89kbflva2sxv"; sha256 = "1vcg8ylh7q69s9y6hj94dqfffwfbann3i28yqgfc01navf6yl07s";
}; };
buildInputs = [ buildInputs = [

View File

@ -1,36 +1,21 @@
{ stdenv, fetchurl, pkgconfig, libvirt, glib, libxml2, intltool, libtool, yajl { stdenv, fetchurl, pkgconfig, libvirt, glib, libxml2, intltool, libtool, yajl
, nettle, libgcrypt, python, pygobject, gobjectIntrospection, libcap_ng, numactl , nettle, libgcrypt, python, pygobject, gobjectIntrospection, libcap_ng, numactl
, xen
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libvirt-glib-0.2.0"; name = "libvirt-glib-0.2.3";
src = fetchurl { src = fetchurl {
url = "http://libvirt.org/sources/glib/${name}.tar.gz"; url = "http://libvirt.org/sources/glib/${name}.tar.gz";
sha256 = "02saqkk4wzsimsan7s9yc5bx05xn7j00hnxhq4sczkgr4krf1drh"; sha256 = "1pahj8qa7k2307sd57rwqwq1hijya02v0sxk91hl3cw48niimcf3";
}; };
buildInputs = [ buildInputs = [
pkgconfig libvirt glib libxml2 intltool libtool yajl nettle libgcrypt pkgconfig libvirt glib libxml2 intltool libtool yajl nettle libgcrypt
python pygobject gobjectIntrospection libcap_ng numactl python pygobject gobjectIntrospection libcap_ng numactl xen
]; ];
# Compiler flag -fstack-protector-all fixes this build error:
#
# ./.libs/libvirt-glib-1.0.so: undefined reference to `__stack_chk_guard'
#
# And the extra include path fixes this build error:
#
# In file included from ../libvirt-gobject/libvirt-gobject-domain-device.h:30:0,
# from /tmp/nix-build-libvirt-glib-0.1.7.drv-2/libvirt-glib-0.1.7/libvirt-gobject/libvirt-gobject.h:33,
# from <stdin>:4:
# ../libvirt-gobject/libvirt-gobject-domain.h:33:29: fatal error: libvirt/libvirt.h: No such file or directory
# compilation terminated.
# make[3]: *** [LibvirtGObject-1.0.gir] Error 1
preConfigure = ''
export NIX_CFLAGS_COMPILE="-fstack-protector-all -I${libvirt}/include"
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Library for working with virtual machines"; description = "Library for working with virtual machines";
longDescription = '' longDescription = ''

View File

@ -2,7 +2,7 @@
, iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext , iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext
, libtasn1, ebtables, libgcrypt, yajl, makeWrapper, pmutils, libcap_ng , libtasn1, ebtables, libgcrypt, yajl, makeWrapper, pmutils, libcap_ng
, dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages , dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages
, curl, libiconv, gmp , curl, libiconv, gmp, xen
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -17,9 +17,10 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
pkgconfig libxml2 gnutls perl python readline pkgconfig libxml2 gnutls perl python readline
gettext libtasn1 libgcrypt yajl makeWrapper gettext libtasn1 libgcrypt yajl makeWrapper
libxslt xhtml1 perlPackages.XMLXPath curl libxslt xhtml1 perlPackages.XMLXPath curl libpcap
] ++ stdenv.lib.optionals stdenv.isLinux [ ] ++ stdenv.lib.optionals stdenv.isLinux [
libpciaccess devicemapper lvm2 utillinux udev libcap_ng libnl numad numactl libpciaccess devicemapper lvm2 utillinux udev libcap_ng
libnl numad numactl xen
] ++ stdenv.lib.optionals stdenv.isDarwin [ ] ++ stdenv.lib.optionals stdenv.isDarwin [
libiconv gmp libiconv gmp
]; ];

View File

@ -13469,7 +13469,7 @@ let
neovim-pygui = pythonPackages.neovim_gui; neovim-pygui = pythonPackages.neovim_gui;
virtviewer = callPackage ../applications/virtualization/virt-viewer { virt-viewer = callPackage ../applications/virtualization/virt-viewer {
gtkvnc = gtkvnc.override { enableGTK3 = true; }; gtkvnc = gtkvnc.override { enableGTK3 = true; };
spice_gtk = spice_gtk.override { enableGTK3 = true; }; spice_gtk = spice_gtk.override { enableGTK3 = true; };
}; };
@ -15865,6 +15865,7 @@ aliases = with self; rec {
tftp_hpa = tftp-hpa; # added 2015-04-03 tftp_hpa = tftp-hpa; # added 2015-04-03
manpages = man-pages; # added 2015-12-06 manpages = man-pages; # added 2015-12-06
mssys = ms-sys; # added 2015-12-13 mssys = ms-sys; # added 2015-12-13
virtviewer = virt-viewer; # added 2015-12-24
}; };
tweakAlias = _n: alias: with lib; tweakAlias = _n: alias: with lib;