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