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
|
2014-12-16 13:05:07 +00:00
|
|
|
, gsettings_desktop_schemas, makeWrapper
|
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;
|
|
|
|
|
|
|
|
let sourceInfo = rec {
|
2011-01-13 22:30:32 +00:00
|
|
|
baseName="virt-viewer";
|
2015-02-17 22:12:45 +00:00
|
|
|
version="2.0";
|
2011-01-13 22:30:32 +00:00
|
|
|
name="${baseName}-${version}";
|
|
|
|
url="http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz";
|
2015-02-17 22:12:45 +00:00
|
|
|
hash="0dylhpk5rq9jz0l1cxs50q2s74z0wingygm1m33bmnmcnny87ig9";
|
2014-05-10 09:37:59 +01:00
|
|
|
}; in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (sourceInfo) name version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2011-01-13 22:30:32 +00:00
|
|
|
url = sourceInfo.url;
|
|
|
|
sha256 = sourceInfo.hash;
|
|
|
|
};
|
|
|
|
|
2014-05-10 09:37:59 +01: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
|
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
|
|
|
}
|