2022-02-14 23:42:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-02-15 00:08:11 +00:00
|
|
|
, bash-completion
|
2022-02-14 23:42:22 +00:00
|
|
|
, fetchurl
|
2022-03-30 11:47:00 +00:00
|
|
|
, fetchpatch
|
2023-02-03 15:35:09 +00:00
|
|
|
, gdbm
|
2022-02-14 23:42:22 +00:00
|
|
|
, glib
|
2024-01-29 01:24:17 +00:00
|
|
|
, gst_all_1
|
2022-02-14 23:42:22 +00:00
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, gtk-vnc
|
|
|
|
, gtk3
|
|
|
|
, intltool
|
2023-02-03 15:35:09 +00:00
|
|
|
, libcap
|
2022-02-15 00:08:11 +00:00
|
|
|
, libgovirt
|
2023-02-03 15:30:04 +00:00
|
|
|
# Currently unsupported. According to upstream, libgovirt is for a very narrow
|
|
|
|
# use-case and we don't currently cover it in Nixpkgs. It's safe to disable.
|
|
|
|
# https://gitlab.com/virt-viewer/virt-viewer/-/issues/100#note_1265011223
|
|
|
|
# Can be enabled again once this is merged:
|
|
|
|
# https://gitlab.com/virt-viewer/virt-viewer/-/merge_requests/129
|
|
|
|
, ovirtSupport ? false
|
2022-02-14 23:42:22 +00:00
|
|
|
, libvirt
|
|
|
|
, libvirt-glib
|
|
|
|
, libxml2
|
2022-02-15 00:08:11 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2022-02-14 23:42:22 +00:00
|
|
|
, pkg-config
|
2022-02-15 00:08:11 +00:00
|
|
|
, python3
|
2022-02-14 23:42:22 +00:00
|
|
|
, shared-mime-info
|
2023-02-03 15:55:49 +00:00
|
|
|
, spice-gtk
|
2023-02-03 15:35:09 +00:00
|
|
|
, spice-protocol
|
2017-03-28 17:13:39 +00:00
|
|
|
, spiceSupport ? true
|
2022-02-14 23:42:22 +00:00
|
|
|
, vte
|
2024-04-26 20:24:03 +00:00
|
|
|
, wrapGAppsHook3
|
2014-05-10 08:37:59 +00:00
|
|
|
}:
|
2011-01-13 22:30:32 +00:00
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
with lib;
|
2014-05-10 08:37:59 +00:00
|
|
|
|
2015-12-24 12:08:10 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-03-07 11:37:20 +00:00
|
|
|
pname = "virt-viewer";
|
2022-02-15 00:08:11 +00:00
|
|
|
version = "11.0";
|
2014-05-10 08:37:59 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-07 11:37:20 +00:00
|
|
|
url = "https://releases.pagure.org/virt-viewer/virt-viewer-${version}.tar.xz";
|
2022-02-15 00:08:11 +00:00
|
|
|
sha256 = "sha256-pD+iMlxMHHelyMmAZaww7wURohrJjlkPIjQIabrZq9A=";
|
2011-01-13 22:30:32 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 11:47:00 +00:00
|
|
|
patches = [
|
2023-02-03 15:35:09 +00:00
|
|
|
# Fix build with meson 0.61. Should be fixed in the next release.
|
|
|
|
# https://gitlab.com/virt-viewer/virt-viewer/-/merge_requests/120
|
2022-03-30 11:47:00 +00:00
|
|
|
(fetchpatch {
|
2023-02-03 15:35:09 +00:00
|
|
|
url = "https://gitlab.com/virt-viewer/virt-viewer/-/commit/98d9f202ef768f22ae21b5c43a080a1aa64a7107.patch";
|
2022-03-30 11:47:00 +00:00
|
|
|
sha256 = "sha256-3AbnkbhWOh0aNjUkmVoSV/9jFQtvTllOr7plnkntb2o=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-02-14 23:42:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
glib
|
|
|
|
intltool
|
2022-02-15 00:08:11 +00:00
|
|
|
meson
|
|
|
|
ninja
|
2022-02-14 23:42:22 +00:00
|
|
|
pkg-config
|
2022-02-15 00:08:11 +00:00
|
|
|
python3
|
2022-02-14 23:42:22 +00:00
|
|
|
shared-mime-info
|
2024-04-26 20:24:03 +00:00
|
|
|
wrapGAppsHook3
|
2022-02-14 23:42:22 +00:00
|
|
|
];
|
|
|
|
|
2015-12-24 12:08:10 +00:00
|
|
|
buildInputs = [
|
2024-01-29 01:24:17 +00:00
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gst-plugins-good
|
2022-02-15 00:08:11 +00:00
|
|
|
bash-completion
|
2022-02-14 23:42:22 +00:00
|
|
|
glib
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
gtk-vnc
|
|
|
|
gtk3
|
|
|
|
libvirt
|
|
|
|
libvirt-glib
|
|
|
|
libxml2
|
|
|
|
vte
|
2023-02-03 15:30:04 +00:00
|
|
|
] ++ optionals ovirtSupport [
|
|
|
|
libgovirt
|
2022-10-28 09:28:43 +00:00
|
|
|
] ++ optionals spiceSupport ([
|
2022-02-14 23:42:22 +00:00
|
|
|
gdbm
|
2023-02-03 15:55:49 +00:00
|
|
|
spice-gtk
|
2022-02-14 23:42:22 +00:00
|
|
|
spice-protocol
|
2022-10-28 09:28:43 +00:00
|
|
|
] ++ optionals stdenv.isLinux [
|
|
|
|
libcap
|
|
|
|
]);
|
2011-01-13 22:30:32 +00:00
|
|
|
|
2019-01-26 15:58:16 +00:00
|
|
|
# Required for USB redirection PolicyKit rules file
|
2023-02-03 15:55:49 +00:00
|
|
|
propagatedUserEnvPkgs = optional spiceSupport spice-gtk;
|
2019-01-26 15:58:16 +00:00
|
|
|
|
2023-02-03 15:30:04 +00:00
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonEnable "ovirt" ovirtSupport)
|
|
|
|
];
|
|
|
|
|
2019-08-20 18:48:38 +00:00
|
|
|
strictDeps = true;
|
2022-02-15 00:08:11 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build-aux/post_install.py
|
|
|
|
'';
|
2019-08-20 18:48:38 +00:00
|
|
|
|
2011-01-13 22:30:32 +00:00
|
|
|
meta = {
|
|
|
|
description = "A viewer for remote virtual machines";
|
2022-10-28 09:28:43 +00:00
|
|
|
maintainers = with maintainers; [ raskin atemu ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2014-05-10 08:37:59 +00:00
|
|
|
license = licenses.gpl2;
|
2011-01-13 22:30:32 +00:00
|
|
|
};
|
|
|
|
passthru = {
|
|
|
|
updateInfo = {
|
2023-10-30 20:41:44 +00:00
|
|
|
downloadPage = "https://virt-manager.org/download.html";
|
2011-01-13 22:30:32 +00:00
|
|
|
};
|
|
|
|
};
|
2014-05-10 08:37:59 +00:00
|
|
|
}
|