From 737c1c491dd78066f0d7a27f0476d3ebcd40140b Mon Sep 17 00:00:00 2001 From: Keith Amidon Date: Thu, 19 Apr 2018 11:40:10 -0700 Subject: [PATCH] gnome-boxes: fix USB redirection (#39129) This fixes USB redirection in gnome-boxes by ensuring that the required PolicyKit action policy file is installed in the spice-gtk package and adding that package to gnome-boxes propagatedUserEnvPkgs. --- pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix | 3 +++ pkgs/development/libraries/spice-gtk/default.nix | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix b/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix index 8921d70787c..8ce9617aaae 100644 --- a/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix +++ b/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix @@ -24,6 +24,9 @@ in stdenv.mkDerivation rec { meson ninja vala pkgconfig gettext itstool wrapGAppsHook gobjectIntrospection desktop-file-utils ]; + # Required for USB redirection PolicyKit rules file + propagatedUserEnvPkgs = [ spice-gtk ]; + buildInputs = [ libvirt-glib glib gtk3 gtkvnc libxml2 libvirt spice-gtk spice-protocol libsoup json-glib webkitgtk libosinfo systemd diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix index 0564459b24c..05fd952eb2e 100644 --- a/pkgs/development/libraries/spice-gtk/default.nix +++ b/pkgs/development/libraries/spice-gtk/default.nix @@ -52,7 +52,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig gettext libsoup autoreconfHook vala gobjectIntrospection ]; - PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "share/polkit-1/actions"; + PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "$(out)/share/polkit-1/actions"; configureFlags = [ "--with-gtk3"