From 876a182b662e05b38046da6b3df1783374a49e02 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 24 Dec 2015 10:10:51 +0000 Subject: [PATCH 1/6] libvirt: fix including libpcap --- pkgs/development/libraries/libvirt/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 2c31ef323f20..1c90b06f5b14 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig libxml2 gnutls perl python readline gettext libtasn1 libgcrypt yajl makeWrapper - libxslt xhtml1 perlPackages.XMLXPath curl + libxslt xhtml1 perlPackages.XMLXPath curl libpcap ] ++ stdenv.lib.optionals stdenv.isLinux [ libpciaccess devicemapper lvm2 utillinux udev libcap_ng libnl numad numactl ] ++ stdenv.lib.optionals stdenv.isDarwin [ From 4e225b61d250100adcb46861788bef7d908baeeb Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 24 Dec 2015 10:57:52 +0000 Subject: [PATCH 2/6] libvirt: add xen support --- pkgs/development/libraries/libvirt/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 1c90b06f5b14..9e69bb8d56f6 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -2,7 +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 +, curl, libiconv, gmp, xen }: stdenv.mkDerivation rec { @@ -19,7 +19,8 @@ stdenv.mkDerivation rec { gettext libtasn1 libgcrypt yajl makeWrapper libxslt xhtml1 perlPackages.XMLXPath curl libpcap ] ++ 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 [ libiconv gmp ]; From 8260022a1bf7c4a63b095ad96eeb36c1e7786c84 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 24 Dec 2015 11:39:13 +0000 Subject: [PATCH 3/6] libvirt-glib: 0.2.0 -> 0.2.3 This also fixes the build with the xen-supporting libvirt and removes obsolete workarounds. --- .../libraries/libvirt-glib/default.nix | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/pkgs/development/libraries/libvirt-glib/default.nix b/pkgs/development/libraries/libvirt-glib/default.nix index 39b053804726..ae83ce78d5fe 100644 --- a/pkgs/development/libraries/libvirt-glib/default.nix +++ b/pkgs/development/libraries/libvirt-glib/default.nix @@ -1,36 +1,21 @@ { stdenv, fetchurl, pkgconfig, libvirt, glib, libxml2, intltool, libtool, yajl , nettle, libgcrypt, python, pygobject, gobjectIntrospection, libcap_ng, numactl +, xen }: stdenv.mkDerivation rec { - name = "libvirt-glib-0.2.0"; + name = "libvirt-glib-0.2.3"; src = fetchurl { url = "http://libvirt.org/sources/glib/${name}.tar.gz"; - sha256 = "02saqkk4wzsimsan7s9yc5bx05xn7j00hnxhq4sczkgr4krf1drh"; + sha256 = "1pahj8qa7k2307sd57rwqwq1hijya02v0sxk91hl3cw48niimcf3"; }; buildInputs = [ 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 :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; { description = "Library for working with virtual machines"; longDescription = '' From 729fb7a44062c6878d5e20e49dd9b827ca8a8605 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 24 Dec 2015 12:08:10 +0000 Subject: [PATCH 4/6] virt-viewer: fix build and clean up --- .../virtualization/virt-viewer/default.nix | 25 ++++++++----------- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/virtualization/virt-viewer/default.nix b/pkgs/applications/virtualization/virt-viewer/default.nix index a6e3dfff0603..f63eeb603068 100644 --- a/pkgs/applications/virtualization/virt-viewer/default.nix +++ b/pkgs/applications/virtualization/virt-viewer/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, intltool, glib, libxml2, gtk3, gtkvnc, gmp , 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 }: @@ -9,25 +9,20 @@ assert spiceSupport -> with stdenv.lib; -let sourceInfo = rec { - baseName="virt-viewer"; - version="2.0"; - name="${baseName}-${version}"; - url="http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz"; - hash="0dylhpk5rq9jz0l1cxs50q2s74z0wingygm1m33bmnmcnny87ig9"; -}; in - -stdenv.mkDerivation { - inherit (sourceInfo) name version; +stdenv.mkDerivation rec { + baseName = "virt-viewer"; + version = "2.0"; + name = "${baseName}-${version}"; src = fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; + url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz"; + sha256 = "0dylhpk5rq9jz0l1cxs50q2s74z0wingygm1m33bmnmcnny87ig9"; }; - buildInputs = [ - pkgconfig intltool glib libxml2 gtk3 gtkvnc gmp libgcrypt gnupg cyrus_sasl numactl + buildInputs = [ + pkgconfig intltool glib libxml2 gtk3 gtkvnc gmp libgcrypt gnupg cyrus_sasl shared_mime_info libvirt libcap_ng yajl gsettings_desktop_schemas makeWrapper + xen numactl ] ++ optionals spiceSupport [ spice_gtk spice_protocol libcap gdbm ]; postInstall = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 05a1525fd4bb..e8ceb32a499d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13469,7 +13469,7 @@ let neovim-pygui = pythonPackages.neovim_gui; - virtviewer = callPackage ../applications/virtualization/virt-viewer { + virt-viewer = callPackage ../applications/virtualization/virt-viewer { gtkvnc = gtkvnc.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 manpages = man-pages; # added 2015-12-06 mssys = ms-sys; # added 2015-12-13 + virtviewer = virt-viewer; # added 2015-12-24 }; tweakAlias = _n: alias: with lib; From 0bd5a83403881fe996f9d6944815a4027dfdc562 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 24 Dec 2015 23:16:05 +0000 Subject: [PATCH 5/6] libosinfo: 0.2.11 -> 0.2.12 Unbreaks gnome-boxes 3.18 --- pkgs/development/libraries/libosinfo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libosinfo/default.nix b/pkgs/development/libraries/libosinfo/default.nix index 7c103d76bd58..83873cc36601 100644 --- a/pkgs/development/libraries/libosinfo/default.nix +++ b/pkgs/development/libraries/libosinfo/default.nix @@ -3,11 +3,11 @@ }: stdenv.mkDerivation rec { - name = "libosinfo-0.2.11"; + name = "libosinfo-0.2.12"; src = fetchurl { url = "https://fedorahosted.org/releases/l/i/libosinfo/${name}.tar.gz"; - sha256 = "0889zvidhmpk3nd7c1xhh3fkk9i014dkr6zdlddh89kbflva2sxv"; + sha256 = "1vcg8ylh7q69s9y6hj94dqfffwfbann3i28yqgfc01navf6yl07s"; }; buildInputs = [ From 8eede9e41ecdd18b93388fb044eef445eb19ada3 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 24 Dec 2015 23:16:59 +0000 Subject: [PATCH 6/6] gnome-boxes, libguestfs: fix builds due to libvirt Adds link time dependencies which are now used in libvirt and unbreaks these packages --- pkgs/desktops/gnome-3/3.16/apps/gnome-boxes/default.nix | 6 +++--- pkgs/desktops/gnome-3/3.18/apps/gnome-boxes/default.nix | 6 +++--- pkgs/development/libraries/libguestfs/default.nix | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/desktops/gnome-3/3.16/apps/gnome-boxes/default.nix b/pkgs/desktops/gnome-3/3.16/apps/gnome-boxes/default.nix index 10eaa34a8a2b..2c670b00f8ab 100644 --- a/pkgs/desktops/gnome-3/3.16/apps/gnome-boxes/default.nix +++ b/pkgs/desktops/gnome-3/3.16/apps/gnome-boxes/default.nix @@ -2,8 +2,8 @@ , glib, gobjectIntrospection, libxml2, gtk3, gtkvnc, libvirt, spice_gtk , spice_protocol, libuuid, libsoup, libosinfo, systemd, tracker, vala , libcap_ng, libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg -, desktop_file_utils, mtools, cdrkit, libcdio -, libusb, libarchive, acl +, desktop_file_utils, mtools, cdrkit, libcdio, libgudev +, libusb, libarchive, acl, xen, numactl }: # TODO: ovirt (optional) @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { gobjectIntrospection libxml2 gtk3 gtkvnc libvirt spice_gtk spice_protocol libuuid libsoup libosinfo systemd tracker vala libcap_ng libcap yajl gmp gdbm cyrus_sasl gnome3.defaultIconTheme libusb libarchive - librsvg desktop_file_utils acl + librsvg desktop_file_utils acl libgudev xen numactl ]; preFixup = '' diff --git a/pkgs/desktops/gnome-3/3.18/apps/gnome-boxes/default.nix b/pkgs/desktops/gnome-3/3.18/apps/gnome-boxes/default.nix index 90955bd3ccf9..6f5af374dbc4 100644 --- a/pkgs/desktops/gnome-3/3.18/apps/gnome-boxes/default.nix +++ b/pkgs/desktops/gnome-3/3.18/apps/gnome-boxes/default.nix @@ -2,8 +2,8 @@ , glib, gobjectIntrospection, libxml2, gtk3, gtkvnc, libvirt, spice_gtk , spice_protocol, libuuid, libsoup, libosinfo, systemd, tracker, vala , libcap_ng, libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg -, desktop_file_utils, mtools, cdrkit, libcdio -, libusb, libarchive, acl +, desktop_file_utils, mtools, cdrkit, libcdio, numactl, xen +, libusb, libarchive, acl, libgudev }: # TODO: ovirt (optional) @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { gobjectIntrospection libxml2 gtk3 gtkvnc libvirt spice_gtk spice_protocol libuuid libsoup libosinfo systemd tracker vala libcap_ng libcap yajl gmp gdbm cyrus_sasl gnome3.defaultIconTheme libusb libarchive - librsvg desktop_file_utils acl + librsvg desktop_file_utils acl libgudev numactl xen ]; preFixup = '' diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index fb988db65d1a..003c1cf3432c 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, pkgconfig, autoconf, automake, libtool, makeWrapper , ncurses, cpio, gperf, perl, cdrkit, flex, bison, qemu, pcre, augeas, libxml2 , 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 { name = "libguestfs-${version}"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { makeWrapper pkgconfig autoconf automake libtool ncurses cpio gperf perl cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong - SysVirt + SysVirt numactl xen ]; configureFlags = "--disable-appliance --disable-daemon";