2022-02-21 08:47:16 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, bash-completion
|
|
|
|
, fetchurl
|
2022-04-03 18:54:34 +00:00
|
|
|
, fetchpatch
|
2022-02-21 08:47:16 +00:00
|
|
|
, gdbm ? null
|
|
|
|
, glib
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, gtk-vnc
|
|
|
|
, gtk3
|
|
|
|
, intltool
|
|
|
|
, libcap ? null
|
|
|
|
, libgovirt
|
|
|
|
, libvirt
|
|
|
|
, libvirt-glib
|
|
|
|
, libxml2
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, shared-mime-info
|
|
|
|
, spice-gtk ? null
|
|
|
|
, spice-protocol ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
, spiceSupport ? true
|
2022-02-21 08:47:16 +00:00
|
|
|
, vte
|
|
|
|
, wrapGAppsHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
assert spiceSupport -> (
|
|
|
|
gdbm != null
|
|
|
|
&& libcap != null
|
|
|
|
&& spice-gtk != null
|
|
|
|
&& spice-protocol != null
|
|
|
|
);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "virt-viewer";
|
2022-02-21 08:47:16 +00:00
|
|
|
version = "11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-30 09:31:56 +00:00
|
|
|
url = "https://releases.pagure.org/virt-viewer/virt-viewer-${version}.tar.xz";
|
2022-02-21 08:47:16 +00:00
|
|
|
sha256 = "sha256-pD+iMlxMHHelyMmAZaww7wURohrJjlkPIjQIabrZq9A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
patches = [
|
|
|
|
# Fix build with meson 0.61
|
|
|
|
# https://gitlab.com/virt-viewer/virt-viewer/-/merge_requests/117
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.com/virt-viewer/virt-viewer/-/commit/ed19e51407bee53988878a6ebed4e7279d00b1a1.patch";
|
|
|
|
sha256 = "sha256-3AbnkbhWOh0aNjUkmVoSV/9jFQtvTllOr7plnkntb2o=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
glib
|
|
|
|
intltool
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
shared-mime-info
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2022-02-21 08:47:16 +00:00
|
|
|
bash-completion
|
|
|
|
glib
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
gtk-vnc
|
|
|
|
gtk3
|
|
|
|
libgovirt
|
|
|
|
libvirt
|
|
|
|
libvirt-glib
|
|
|
|
libxml2
|
|
|
|
vte
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ optionals spiceSupport [
|
2022-02-21 08:47:16 +00:00
|
|
|
gdbm
|
|
|
|
libcap
|
|
|
|
spice-gtk
|
|
|
|
spice-protocol
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Required for USB redirection PolicyKit rules file
|
|
|
|
propagatedUserEnvPkgs = optional spiceSupport spice-gtk;
|
|
|
|
|
|
|
|
strictDeps = true;
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build-aux/post_install.py
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|