2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, intltool, shared-mime-info, wrapGAppsHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib, gsettings-desktop-schemas, gtk-vnc, gtk3, libvirt, libvirt-glib, libxml2, vte
|
|
|
|
, spiceSupport ? true
|
|
|
|
, spice-gtk ? null, spice-protocol ? null, libcap ? null, gdbm ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert spiceSupport ->
|
|
|
|
spice-gtk != null && spice-protocol != null && libcap != null && gdbm != null;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
baseName = "virt-viewer";
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "9.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
name = "${baseName}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz";
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "09a83mzyn3b4nd7wpa659g1zf1fjbzb79rk968bz6k5xl21k7d4i";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config intltool shared-mime-info wrapGAppsHook glib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
glib gsettings-desktop-schemas gtk-vnc gtk3 libvirt libvirt-glib libxml2 vte
|
|
|
|
] ++ optionals spiceSupport [
|
|
|
|
spice-gtk spice-protocol libcap gdbm
|
|
|
|
];
|
|
|
|
|
|
|
|
# Required for USB redirection PolicyKit rules file
|
|
|
|
propagatedUserEnvPkgs = optional spiceSupport spice-gtk;
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A viewer for remote virtual machines";
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
passthru = {
|
|
|
|
updateInfo = {
|
|
|
|
downloadPage = "http://virt-manager.org/download.html";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|