lol

Merge pull request #11924 from mayflower/libvirt-pcap

libvirt: fix including libpcap and add xen support

+30 -48
+10 -15
pkgs/applications/virtualization/virt-viewer/default.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, intltool, glib, libxml2, gtk3, gtkvnc, gmp 2 2 , libgcrypt, gnupg, cyrus_sasl, shared_mime_info, libvirt, libcap_ng, yajl 3 - , gsettings_desktop_schemas, makeWrapper, numactl 3 + , gsettings_desktop_schemas, makeWrapper, xen, numactl 4 4 , spiceSupport ? true, spice_gtk ? null, spice_protocol ? null, libcap ? null, gdbm ? null 5 5 }: 6 6 ··· 9 9 10 10 with stdenv.lib; 11 11 12 - let sourceInfo = rec { 13 - baseName="virt-viewer"; 14 - version="2.0"; 15 - name="${baseName}-${version}"; 16 - url="http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz"; 17 - hash="0dylhpk5rq9jz0l1cxs50q2s74z0wingygm1m33bmnmcnny87ig9"; 18 - }; in 19 - 20 - stdenv.mkDerivation { 21 - inherit (sourceInfo) name version; 12 + stdenv.mkDerivation rec { 13 + baseName = "virt-viewer"; 14 + version = "2.0"; 15 + name = "${baseName}-${version}"; 22 16 23 17 src = fetchurl { 24 - url = sourceInfo.url; 25 - sha256 = sourceInfo.hash; 18 + url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz"; 19 + sha256 = "0dylhpk5rq9jz0l1cxs50q2s74z0wingygm1m33bmnmcnny87ig9"; 26 20 }; 27 21 28 - buildInputs = [ 29 - pkgconfig intltool glib libxml2 gtk3 gtkvnc gmp libgcrypt gnupg cyrus_sasl numactl 22 + buildInputs = [ 23 + pkgconfig intltool glib libxml2 gtk3 gtkvnc gmp libgcrypt gnupg cyrus_sasl 30 24 shared_mime_info libvirt libcap_ng yajl gsettings_desktop_schemas makeWrapper 25 + xen numactl 31 26 ] ++ optionals spiceSupport [ spice_gtk spice_protocol libcap gdbm ]; 32 27 33 28 postInstall = ''
+3 -3
pkgs/desktops/gnome-3/3.16/apps/gnome-boxes/default.nix
··· 2 2 , glib, gobjectIntrospection, libxml2, gtk3, gtkvnc, libvirt, spice_gtk 3 3 , spice_protocol, libuuid, libsoup, libosinfo, systemd, tracker, vala 4 4 , libcap_ng, libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg 5 - , desktop_file_utils, mtools, cdrkit, libcdio 6 - , libusb, libarchive, acl 5 + , desktop_file_utils, mtools, cdrkit, libcdio, libgudev 6 + , libusb, libarchive, acl, xen, numactl 7 7 }: 8 8 9 9 # TODO: ovirt (optional) ··· 25 25 gobjectIntrospection libxml2 gtk3 gtkvnc libvirt spice_gtk spice_protocol 26 26 libuuid libsoup libosinfo systemd tracker vala libcap_ng libcap yajl gmp 27 27 gdbm cyrus_sasl gnome3.defaultIconTheme libusb libarchive 28 - librsvg desktop_file_utils acl 28 + librsvg desktop_file_utils acl libgudev xen numactl 29 29 ]; 30 30 31 31 preFixup = ''
+3 -3
pkgs/desktops/gnome-3/3.18/apps/gnome-boxes/default.nix
··· 2 2 , glib, gobjectIntrospection, libxml2, gtk3, gtkvnc, libvirt, spice_gtk 3 3 , spice_protocol, libuuid, libsoup, libosinfo, systemd, tracker, vala 4 4 , libcap_ng, libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg 5 - , desktop_file_utils, mtools, cdrkit, libcdio 6 - , libusb, libarchive, acl 5 + , desktop_file_utils, mtools, cdrkit, libcdio, numactl, xen 6 + , libusb, libarchive, acl, libgudev 7 7 }: 8 8 9 9 # TODO: ovirt (optional) ··· 20 20 gobjectIntrospection libxml2 gtk3 gtkvnc libvirt spice_gtk spice_protocol 21 21 libuuid libsoup libosinfo systemd tracker vala libcap_ng libcap yajl gmp 22 22 gdbm cyrus_sasl gnome3.defaultIconTheme libusb libarchive 23 - librsvg desktop_file_utils acl 23 + librsvg desktop_file_utils acl libgudev numactl xen 24 24 ]; 25 25 26 26 preFixup = ''
+2 -2
pkgs/development/libraries/libguestfs/default.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, autoconf, automake, libtool, makeWrapper 2 2 , ncurses, cpio, gperf, perl, cdrkit, flex, bison, qemu, pcre, augeas, libxml2 3 3 , acl, libcap, libcap_ng, libconfig, systemd, fuse, yajl, libvirt, hivex 4 - , gmp, readline, file, libintlperl, GetoptLong, SysVirt }: 4 + , gmp, readline, file, libintlperl, GetoptLong, SysVirt, numactl, xen }: 5 5 6 6 stdenv.mkDerivation rec { 7 7 name = "libguestfs-${version}"; ··· 21 21 makeWrapper pkgconfig autoconf automake libtool ncurses cpio gperf perl 22 22 cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig 23 23 systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong 24 - SysVirt 24 + SysVirt numactl xen 25 25 ]; 26 26 27 27 configureFlags = "--disable-appliance --disable-daemon";
+2 -2
pkgs/development/libraries/libosinfo/default.nix
··· 3 3 }: 4 4 5 5 stdenv.mkDerivation rec { 6 - name = "libosinfo-0.2.11"; 6 + name = "libosinfo-0.2.12"; 7 7 8 8 src = fetchurl { 9 9 url = "https://fedorahosted.org/releases/l/i/libosinfo/${name}.tar.gz"; 10 - sha256 = "0889zvidhmpk3nd7c1xhh3fkk9i014dkr6zdlddh89kbflva2sxv"; 10 + sha256 = "1vcg8ylh7q69s9y6hj94dqfffwfbann3i28yqgfc01navf6yl07s"; 11 11 }; 12 12 13 13 buildInputs = [
+4 -19
pkgs/development/libraries/libvirt-glib/default.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, libvirt, glib, libxml2, intltool, libtool, yajl 2 2 , nettle, libgcrypt, python, pygobject, gobjectIntrospection, libcap_ng, numactl 3 + , xen 3 4 }: 4 5 5 6 stdenv.mkDerivation rec { 6 - name = "libvirt-glib-0.2.0"; 7 + name = "libvirt-glib-0.2.3"; 7 8 8 9 src = fetchurl { 9 10 url = "http://libvirt.org/sources/glib/${name}.tar.gz"; 10 - sha256 = "02saqkk4wzsimsan7s9yc5bx05xn7j00hnxhq4sczkgr4krf1drh"; 11 + sha256 = "1pahj8qa7k2307sd57rwqwq1hijya02v0sxk91hl3cw48niimcf3"; 11 12 }; 12 13 13 14 buildInputs = [ 14 15 pkgconfig libvirt glib libxml2 intltool libtool yajl nettle libgcrypt 15 - python pygobject gobjectIntrospection libcap_ng numactl 16 + python pygobject gobjectIntrospection libcap_ng numactl xen 16 17 ]; 17 - 18 - # Compiler flag -fstack-protector-all fixes this build error: 19 - # 20 - # ./.libs/libvirt-glib-1.0.so: undefined reference to `__stack_chk_guard' 21 - # 22 - # And the extra include path fixes this build error: 23 - # 24 - # In file included from ../libvirt-gobject/libvirt-gobject-domain-device.h:30:0, 25 - # from /tmp/nix-build-libvirt-glib-0.1.7.drv-2/libvirt-glib-0.1.7/libvirt-gobject/libvirt-gobject.h:33, 26 - # from <stdin>:4: 27 - # ../libvirt-gobject/libvirt-gobject-domain.h:33:29: fatal error: libvirt/libvirt.h: No such file or directory 28 - # compilation terminated. 29 - # make[3]: *** [LibvirtGObject-1.0.gir] Error 1 30 - preConfigure = '' 31 - export NIX_CFLAGS_COMPILE="-fstack-protector-all -I${libvirt}/include" 32 - ''; 33 18 34 19 meta = with stdenv.lib; { 35 20 description = "Library for working with virtual machines";
+4 -3
pkgs/development/libraries/libvirt/default.nix
··· 2 2 , iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext 3 3 , libtasn1, ebtables, libgcrypt, yajl, makeWrapper, pmutils, libcap_ng 4 4 , dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages 5 - , curl, libiconv, gmp 5 + , curl, libiconv, gmp, xen 6 6 }: 7 7 8 8 stdenv.mkDerivation rec { ··· 17 17 buildInputs = [ 18 18 pkgconfig libxml2 gnutls perl python readline 19 19 gettext libtasn1 libgcrypt yajl makeWrapper 20 - libxslt xhtml1 perlPackages.XMLXPath curl 20 + libxslt xhtml1 perlPackages.XMLXPath curl libpcap 21 21 ] ++ stdenv.lib.optionals stdenv.isLinux [ 22 - libpciaccess devicemapper lvm2 utillinux udev libcap_ng libnl numad numactl 22 + libpciaccess devicemapper lvm2 utillinux udev libcap_ng 23 + libnl numad numactl xen 23 24 ] ++ stdenv.lib.optionals stdenv.isDarwin [ 24 25 libiconv gmp 25 26 ];
+2 -1
pkgs/top-level/all-packages.nix
··· 13469 13469 13470 13470 neovim-pygui = pythonPackages.neovim_gui; 13471 13471 13472 - virtviewer = callPackage ../applications/virtualization/virt-viewer { 13472 + virt-viewer = callPackage ../applications/virtualization/virt-viewer { 13473 13473 gtkvnc = gtkvnc.override { enableGTK3 = true; }; 13474 13474 spice_gtk = spice_gtk.override { enableGTK3 = true; }; 13475 13475 }; ··· 15865 15865 tftp_hpa = tftp-hpa; # added 2015-04-03 15866 15866 manpages = man-pages; # added 2015-12-06 15867 15867 mssys = ms-sys; # added 2015-12-13 15868 + virtviewer = virt-viewer; # added 2015-12-24 15868 15869 }; 15869 15870 15870 15871 tweakAlias = _n: alias: with lib;