nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchurl,
5 meson,
6 ninja,
7 wrapGAppsHook3,
8 pkg-config,
9 gettext,
10 itstool,
11 libvirt-glib,
12 glib,
13 gobject-introspection,
14 libxml2,
15 gtk3,
16 libvirt,
17 spice-gtk,
18 spice-protocol,
19 libhandy,
20 libsoup_3,
21 libosinfo,
22 systemd,
23 vala,
24 libcap,
25 yajl,
26 gmp,
27 gdbm,
28 cyrus_sasl,
29 gnome,
30 adwaita-icon-theme,
31 librsvg,
32 desktop-file-utils,
33 mtools,
34 cdrkit,
35 libcdio,
36 libusb1,
37 libarchive,
38 acl,
39 libgudev,
40 libcap_ng,
41 numactl,
42 libapparmor,
43 json-glib,
44 webkitgtk_4_1,
45 vte,
46 glib-networking,
47 qemu-utils,
48 libportal-gtk3,
49}:
50
51stdenv.mkDerivation (finalAttrs: {
52 pname = "gnome-boxes";
53 version = "49.1";
54
55 src = fetchurl {
56 url = "mirror://gnome/sources/gnome-boxes/${lib.versions.major finalAttrs.version}/gnome-boxes-${finalAttrs.version}.tar.xz";
57 hash = "sha256-VUeIAd3Qg4IL0yMZKoN04E879CoOcSYy0F5olVMORMo=";
58 };
59
60 patches = [
61 # Fix path to libgovf-0.1.so in the gir file. We patch gobject-introspection to hardcode absolute paths but
62 # our Meson patch will only pass the info when install_dir is absolute as well.
63 ./fix-gir-lib-path.patch
64 ];
65
66 doCheck = true;
67
68 nativeBuildInputs = [
69 gettext
70 gobject-introspection
71 itstool
72 meson
73 ninja
74 pkg-config
75 vala
76 wrapGAppsHook3
77 # For post install script
78 glib
79 gtk3
80 desktop-file-utils
81 ];
82
83 # Required for USB redirection PolicyKit rules file
84 propagatedUserEnvPkgs = [ spice-gtk ];
85
86 buildInputs = [
87 acl
88 cyrus_sasl
89 gdbm
90 glib
91 glib-networking
92 gmp
93 adwaita-icon-theme
94 gtk3
95 json-glib
96 libapparmor
97 libarchive
98 libcap
99 libcap_ng
100 libgudev
101 libhandy
102 libosinfo
103 librsvg
104 libsoup_3
105 libusb1
106 libvirt
107 libvirt-glib
108 libxml2
109 numactl
110 spice-gtk
111 spice-protocol
112 systemd
113 vte
114 webkitgtk_4_1
115 yajl
116 libportal-gtk3
117 ];
118
119 preFixup = ''
120 gappsWrapperArgs+=(--prefix PATH : "${
121 lib.makeBinPath [
122 mtools
123 cdrkit
124 libcdio
125 qemu-utils
126 ]
127 }")
128 '';
129
130 passthru = {
131 updateScript = gnome.updateScript { packageName = "gnome-boxes"; };
132 };
133
134 meta = {
135 description = "Simple GNOME 3 application to access remote or virtual systems";
136 mainProgram = "gnome-boxes";
137 homepage = "https://apps.gnome.org/Boxes/";
138 license = lib.licenses.lgpl2Plus;
139 platforms = lib.platforms.linux;
140 teams = [ lib.teams.gnome ];
141 };
142})