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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

114 lines
2.4 KiB
Nix
Raw Normal View History

{ lib
, stdenv
2022-02-15 00:08:11 +00:00
, bash-completion
, fetchurl
2022-03-30 11:47:00 +00:00
, fetchpatch
2023-02-03 15:35:09 +00:00
, gdbm
, glib
, gst_all_1
, 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
, libvirt
, libvirt-glib
, libxml2
2022-02-15 00:08:11 +00:00
, meson
, ninja
, pkg-config
2022-02-15 00:08:11 +00:00
, python3
, shared-mime-info
2023-02-03 15:55:49 +00:00
, spice-gtk
2023-02-03 15:35:09 +00:00
, spice-protocol
, spiceSupport ? true
, vte
, wrapGAppsHook3
}:
2021-01-15 05:42:41 +00:00
with lib;
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";
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=";
};
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=";
})
];
nativeBuildInputs = [
glib
intltool
2022-02-15 00:08:11 +00:00
meson
ninja
pkg-config
2022-02-15 00:08:11 +00:00
python3
shared-mime-info
wrapGAppsHook3
];
2015-12-24 12:08:10 +00:00
buildInputs = [
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
2022-02-15 00:08:11 +00:00
bash-completion
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 ([
gdbm
2023-02-03 15:55:49 +00:00
spice-gtk
spice-protocol
2022-10-28 09:28:43 +00:00
] ++ optionals stdenv.isLinux [
libcap
]);
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
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;
license = licenses.gpl2;
};
passthru = {
updateInfo = {
downloadPage = "https://virt-manager.org/download.html";
};
};
}