1{ lib, stdenv
2, fetchurl
3, meson
4, ninja
5, pkg-config
6, pixman
7, alsa-lib
8, openssl
9, libXrandr
10, libXfixes
11, libXext
12, libXrender
13, libXinerama
14, libjpeg
15, zlib
16, spice-protocol
17, python3
18, glib
19, cyrus_sasl
20, libcacard
21, lz4
22, libopus
23, gst_all_1
24, orc
25, gdk-pixbuf
26}:
27
28stdenv.mkDerivation rec {
29 pname = "spice";
30 version = "0.15.2";
31
32 src = fetchurl {
33 url = "https://www.spice-space.org/download/releases/spice-server/${pname}-${version}.tar.bz2";
34 sha256 = "sha256-bZ62EX8DkXRxxLwQAEq+z/SKefuF64WhxF8CM3cBW4E=";
35 };
36
37 patches = [
38 ./remove-rt-on-darwin.patch
39 ];
40
41 nativeBuildInputs = [
42 glib
43 meson
44 ninja
45 pkg-config
46 python3
47 python3.pkgs.six
48 python3.pkgs.pyparsing
49 ];
50
51 buildInputs = [
52 cyrus_sasl
53 glib
54 gst_all_1.gst-plugins-base
55 libXext
56 libXfixes
57 libXinerama
58 libXrandr
59 libXrender
60 libcacard
61 libjpeg
62 libopus
63 lz4
64 openssl
65 orc
66 pixman
67 python3.pkgs.pyparsing
68 spice-protocol
69 zlib
70 ] ++ lib.optionals stdenv.isLinux [
71 alsa-lib
72 ] ++ lib.optionals stdenv.isDarwin [
73 gdk-pixbuf
74 ];
75
76 env.NIX_CFLAGS_COMPILE = "-fno-stack-protector";
77
78 mesonFlags = [
79 "-Dgstreamer=1.0"
80 ];
81
82 postPatch = ''
83 patchShebangs build-aux
84
85 # Forgotten in 0.15.2 tarball
86 sed -i /meson.add_dist_script/d meson.build
87 '';
88
89 postInstall = ''
90 ln -s spice-server $out/include/spice
91 '';
92
93 meta = with lib; {
94 description = "Complete open source solution for interaction with virtualized desktop devices";
95 longDescription = ''
96 The Spice project aims to provide a complete open source solution for interaction
97 with virtualized desktop devices.The Spice project deals with both the virtualized
98 devices and the front-end. Interaction between front-end and back-end is done using
99 VD-Interfaces. The VD-Interfaces (VDI) enable both ends of the solution to be easily
100 utilized by a third-party component.
101 '';
102 homepage = "https://www.spice-space.org/";
103 license = licenses.lgpl21;
104
105 maintainers = with maintainers; [ bluescreen303 atemu ];
106 platforms = with platforms; linux ++ darwin;
107 };
108}