nixpkgs/pkgs/applications/virtualization/virt-viewer/default.nix

56 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, intltool, glib, libxml2, gtk3, gtk-vnc, gmp
, libgcrypt, gnupg, cyrus_sasl, shared-mime-info, libvirt, yajl, xen
, gsettings-desktop-schemas, makeWrapper, libvirt-glib, libcap_ng, numactl
2018-05-11 17:49:14 +00:00
, libapparmor, gst_all_1
, 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;
2015-12-24 12:08:10 +00:00
stdenv.mkDerivation rec {
baseName = "virt-viewer";
version = "7.0";
2015-12-24 12:08:10 +00:00
name = "${baseName}-${version}";
src = fetchurl {
2015-12-24 12:08:10 +00:00
url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz";
sha256 = "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7";
};
nativeBuildInputs = [ pkgconfig intltool ];
2015-12-24 12:08:10 +00:00
buildInputs = [
glib libxml2 gtk3 gtk-vnc gmp libgcrypt gnupg cyrus_sasl shared-mime-info
libvirt yajl gsettings-desktop-schemas makeWrapper libvirt-glib
libcap_ng numactl libapparmor
] ++ optionals stdenv.isx86_64 [
xen
] ++ optionals spiceSupport [
spice-gtk spice-protocol libcap gdbm
2018-05-11 17:49:14 +00:00
gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
];
postInstall = ''
for f in "$out"/bin/*; do
2018-05-11 17:49:14 +00:00
wrapProgram "$f" \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
done
'';
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";
};
};
}