2014-05-10 09:37:59 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, intltool, glib, libxml2, gtk3, gtkvnc, gmp
|
2014-12-16 08:35:39 +00:00
|
|
|
, libgcrypt, gnupg, cyrus_sasl, shared_mime_info, libvirt, libcap_ng, yajl
|
2015-12-24 12:08:10 +00:00
|
|
|
, gsettings_desktop_schemas, makeWrapper, xen, numactl
|
2014-12-16 08:35:39 +00:00
|
|
|
, spiceSupport ? true, spice_gtk ? null, spice_protocol ? null, libcap ? null, gdbm ? null
|
2014-05-10 09:37:59 +01:00
|
|
|
}:
|
2011-01-13 22:30:32 +00:00
|
|
|
|
2014-12-16 08:35:39 +00:00
|
|
|
assert spiceSupport ->
|
|
|
|
spice_gtk != null && spice_protocol != null && libcap != null && gdbm != null;
|
|
|
|
|
2014-05-10 09:37:59 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2015-12-24 12:08:10 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
baseName = "virt-viewer";
|
|
|
|
version = "2.0";
|
|
|
|
name = "${baseName}-${version}";
|
2014-05-10 09:37:59 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-12-24 12:08:10 +00:00
|
|
|
url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz";
|
|
|
|
sha256 = "0dylhpk5rq9jz0l1cxs50q2s74z0wingygm1m33bmnmcnny87ig9";
|
2011-01-13 22:30:32 +00:00
|
|
|
};
|
|
|
|
|
2015-12-24 12:08:10 +00:00
|
|
|
buildInputs = [
|
|
|
|
pkgconfig intltool glib libxml2 gtk3 gtkvnc gmp libgcrypt gnupg cyrus_sasl
|
2014-12-16 13:05:07 +00:00
|
|
|
shared_mime_info libvirt libcap_ng yajl gsettings_desktop_schemas makeWrapper
|
2015-12-24 12:08:10 +00:00
|
|
|
xen numactl
|
2014-12-16 08:35:39 +00:00
|
|
|
] ++ optionals spiceSupport [ spice_gtk spice_protocol libcap gdbm ];
|
2011-01-13 22:30:32 +00:00
|
|
|
|
2014-12-16 13:05:07 +00:00
|
|
|
postInstall = ''
|
|
|
|
for f in "$out"/bin/*; do
|
|
|
|
wrapProgram "$f" --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2011-01-13 22:30:32 +00:00
|
|
|
meta = {
|
|
|
|
description = "A viewer for remote virtual machines";
|
2014-09-13 12:51:39 +01:00
|
|
|
maintainers = [ maintainers.raskin ];
|
2014-05-10 09:37:59 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
2011-01-13 22:30:32 +00:00
|
|
|
};
|
|
|
|
passthru = {
|
|
|
|
updateInfo = {
|
|
|
|
downloadPage = "http://virt-manager.org/download.html";
|
|
|
|
};
|
|
|
|
};
|
2014-05-10 09:37:59 +01:00
|
|
|
}
|