virt-viewer: fix SPICE support

* Add missing dependency on 'spice_protocol'

* Fix new build error which came now that ./configure enables SPICE support:

  building virt-viewer
    CCLD     virt-viewer
  /nix/store/b8qhjrwf8sf9ggkjxqqav7f1m6w83bh0-binutils-2.23.1/bin/ld: cannot find -lgdbm
  /nix/store/b8qhjrwf8sf9ggkjxqqav7f1m6w83bh0-binutils-2.23.1/bin/ld: cannot find -lcap
  collect2: error: ld returned 1 exit status

  Fix by adding gddbm and libcap as inputs. Yes, libcap is needed
  _in addition_ to libcap_ng (I tested removing libcap_ng, it failed).

Without this change, virt-viewer cannot be used with guests machines
that uses SPICE.
This commit is contained in:
Bjørn Forsman 2014-12-16 09:35:39 +01:00
parent 80838029ac
commit 477bc03568

View file

@ -1,8 +1,11 @@
{ stdenv, fetchurl, pkgconfig, intltool, glib, libxml2, gtk3, gtkvnc, gmp
, libgcrypt, gnupg, cyrus_sasl, spiceSupport ? true, spice_gtk, shared_mime_info
, libvirt, libcap_ng, yajl
, libgcrypt, gnupg, cyrus_sasl, shared_mime_info, libvirt, libcap_ng, yajl
, spiceSupport ? true, spice_gtk ? null, spice_protocol ? null, libcap ? null, gdbm ? null
}:
assert spiceSupport ->
spice_gtk != null && spice_protocol != null && libcap != null && gdbm != null;
with stdenv.lib;
let sourceInfo = rec {
@ -24,7 +27,7 @@ stdenv.mkDerivation {
buildInputs = [
pkgconfig intltool glib libxml2 gtk3 gtkvnc gmp libgcrypt gnupg cyrus_sasl
shared_mime_info libvirt libcap_ng yajl
] ++ optional spiceSupport spice_gtk;
] ++ optionals spiceSupport [ spice_gtk spice_protocol libcap gdbm ];
meta = {
description = "A viewer for remote virtual machines";