From 5b83791207d1521dde3a6f7f4f70d730571668a4 Mon Sep 17 00:00:00 2001 From: Adam Boseley Date: Thu, 5 Nov 2015 21:39:55 +1000 Subject: spice-vdagentd service : initial at 0.16.0 --- lib/maintainers.nix | 1 + nixos/modules/module-list.nix | 1 + nixos/modules/services/misc/spice-vdagentd.nix | 30 ++++++++++++++++++++++ .../virtualization/spice-vdagent/default.nix | 29 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 5 files changed, 63 insertions(+) create mode 100644 nixos/modules/services/misc/spice-vdagentd.nix create mode 100644 pkgs/applications/virtualization/spice-vdagent/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 7362c6ab659..84e95a2409e 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -10,6 +10,7 @@ aaronschif = "Aaron Schif "; abaldeau = "Andreas Baldeau "; abbradar = "Nikolay Amiantov "; + aboseley = "Adam Boseley "; adev = "Adrien Devresse "; aespinosa = "Allan Espinosa "; aflatter = "Alexander Flatter "; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5d487776be2..0105cc3cdf2 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -240,6 +240,7 @@ ./services/misc/ripple-data-api.nix ./services/misc/rogue.nix ./services/misc/siproxd.nix + ./services/misc/spice-vdagentd.nix ./services/misc/subsonic.nix ./services/misc/sundtek.nix ./services/misc/svnserve.nix diff --git a/nixos/modules/services/misc/spice-vdagentd.nix b/nixos/modules/services/misc/spice-vdagentd.nix new file mode 100644 index 00000000000..f8133394ffd --- /dev/null +++ b/nixos/modules/services/misc/spice-vdagentd.nix @@ -0,0 +1,30 @@ +{ config, pkgs, lib, ... }: + +with lib; +let + cfg = config.services.spice-vdagentd; +in +{ + options = { + services.spice-vdagentd = { + enable = mkEnableOption "Spice guest vdagent daemon"; + }; + }; + + config = mkIf cfg.enable { + + environment.systemPackages = [ pkgs.spice-vdagent ]; + + systemd.services.spice-vdagentd = { + description = "spice-vdagent daemon"; + wantedBy = [ "graphical.target" ]; + preStart = '' + mkdir -p "/var/run/spice-vdagentd/" + ''; + serviceConfig = { + Type = "forking"; + ExecStart = "/bin/sh -c '${pkgs.spice-vdagent}/bin/spice-vdagentd'"; + }; + }; + }; +} diff --git a/pkgs/applications/virtualization/spice-vdagent/default.nix b/pkgs/applications/virtualization/spice-vdagent/default.nix new file mode 100644 index 00000000000..add5f96e7f5 --- /dev/null +++ b/pkgs/applications/virtualization/spice-vdagent/default.nix @@ -0,0 +1,29 @@ +{stdenv, fetchurl, pkgconfig, alsaLib, spice_protocol, glib, + libpciaccess, libxcb, libXrandr, libXinerama, libXfixes}: +stdenv.mkDerivation rec { + name = "spice-vdagent-0.16.0"; + src = fetchurl { + url = "http://www.spice-space.org/download/releases/${name}.tar.bz2"; + sha256 = "0z8gwc5va2i64mjippavmxajdb9az83ffqyhlbynm6dxw131d5av"; + }; + postPatch = '' + substituteInPlace data/spice-vdagent.desktop --replace /usr $out + ''; + buildInputs = [ pkgconfig alsaLib spice_protocol glib + libpciaccess libxcb libXrandr libXinerama libXfixes ] ; + meta = { + description = "Enhanced SPICE integration for linux QEMU guest"; + longDescription = '' + Spice agent for linux guests offering + * Client mouse mode + * Copy and paste + * Automatic adjustment of the X-session resolution + to the client resolution + * Multiple displays + ''; + homepage = http://www.spice-space.org/home.html; + license = stdenv.lib.licenses.gpl3; + maintainers = [ stdenv.lib.maintainers.aboseley ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9c116ef927d..fe5ecdf3552 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13519,6 +13519,8 @@ let sound-juicer = callPackage ../applications/audio/sound-juicer { }; + spice-vdagent = callPackage ../applications/virtualization/spice-vdagent { }; + spideroak = callPackage ../applications/networking/spideroak { }; ssvnc = callPackage ../applications/networking/remote/ssvnc { }; -- cgit 1.4.1