From cb4443ef260926290184f8952070fab45b55a6dc Mon Sep 17 00:00:00 2001 From: Mathijs Kwik Date: Tue, 28 Aug 2012 00:47:00 +0200 Subject: [PATCH] add spice-0.10.1 spice is a next-generation remote desktop protocol, aimed at virtual machines. focus is not just on display/input devices, but clipboard, audio, video, opengl, smartcards, usb devices as well, no matter if the virtual machine runs locally or on a remote host. not everything is implemented yet, and I didn't enable all available features yet. Currently, spice is able to make qemu-kvm virtual machines very usable for workstation guests, with good 2d video support, clipboard sharing, full resolutions, auto-mouse-grab/ungrab, xinerama / multiple guest monitors. Good drivers for windows 7 guests are available, as well as linux Xorg drivers / agents. Basically, kvm was already the best-performing VM solution (using virtio drivers), but virtualbox, while slower, had better desktop-integration support (still wins if you want opengl). Spice fixes this, making the choice very easy. --- pkgs/development/libraries/spice/default.nix | 46 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/libraries/spice/default.nix diff --git a/pkgs/development/libraries/spice/default.nix b/pkgs/development/libraries/spice/default.nix new file mode 100644 index 000000000000..f14214f5a882 --- /dev/null +++ b/pkgs/development/libraries/spice/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, pkgconfig, pixman, celt, alsaLib, openssl +, libXrandr, libXfixes, libXext, libXrender, libXinerama, libjpeg, zlib +, spiceProtocol }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "spice-0.10.1"; + + src = fetchurl { + url = "http://www.spice-space.org/download/releases/${name}.tar.bz2"; + sha256 = "105p5fh6hhhzvz0fh1x52lzi41rpvajf390xbbw3da4417lf5pqk"; + }; + + buildInputs = [ pixman celt alsaLib openssl libjpeg zlib + libXrandr libXfixes libXrender libXext libXinerama + ]; + + buildNativeInputs = [ pkgconfig spiceProtocol ]; + + # NIX_CFLAGS_COMPILE = "-fno-stack-protector"; + + configureFlags = [ + "--with-sasl=no" + ]; + + postInstall = '' + ln -s spice-server $out/include/spice + ''; + + meta = { + description = "Complete open source solution for interaction with virtualized desktop devices"; + longDescription = '' + The Spice project aims to provide a complete open source solution for interaction + with virtualized desktop devices.The Spice project deals with both the virtualized + devices and the front-end. Interaction between front-end and back-end is done using + VD-Interfaces. The VD-Interfaces (VDI) enable both ends of the solution to be easily + utilized by a third-party component. + ''; + homepage = http://www.spice-space.org/; + license = licenses.lgpl21; + + maintainers = [ maintainers.bluescreen303 ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e94767297d5b..9c7f687e5279 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4795,6 +4795,11 @@ let sphinxbase = callPackage ../development/libraries/sphinxbase { }; + spice = callPackage ../development/libraries/spice { + celt = celt_0_5_1; + inherit (xlibs) libXrandr libXfixes libXext libXrender libXinerama; + }; + spiceProtocol = callPackage ../development/libraries/spice-protocol { }; sratom = callPackage ../development/libraries/audio/sratom { };