1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
{ lib
, stdenv
, bash-completion
, fetchurl
, 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
, spiceSupport ? true
, vte
, wrapGAppsHook
}:
assert spiceSupport -> (
gdbm != null
&& libcap != null
&& spice-gtk != null
&& spice-protocol != null
);
with lib;
stdenv.mkDerivation rec {
baseName = "virt-viewer";
version = "11.0";
name = "${baseName}-${version}";
src = fetchurl {
url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.xz";
sha256 = "sha256-pD+iMlxMHHelyMmAZaww7wURohrJjlkPIjQIabrZq9A=";
};
nativeBuildInputs = [
glib
intltool
meson
ninja
pkg-config
python3
shared-mime-info
wrapGAppsHook
];
buildInputs = [
bash-completion
glib
gsettings-desktop-schemas
gtk-vnc
gtk3
libgovirt
libvirt
libvirt-glib
libxml2
vte
] ++ optionals spiceSupport [
gdbm
libcap
spice-gtk
spice-protocol
];
# Required for USB redirection PolicyKit rules file
propagatedUserEnvPkgs = optional spiceSupport spice-gtk;
strictDeps = true;
postPatch = ''
patchShebangs build-aux/post_install.py
'';
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";
};
};
}
|