From 9a971364ac68185e3aaec310396e5df017c0d42c Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Mon, 16 Mar 2015 13:21:23 +0100 Subject: [PATCH] Patch gnome-control-center not to override VPN plugin paths. The network-manager vpn plugin configuration files contain the correct absolute paths to the plugin libraries in the store; however upstream (unsuccessfully) tries to find them in a predefined path. --- .../core/gnome-control-center/default.nix | 2 +- .../vpn_plugins_path.patch | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 pkgs/desktops/gnome-3/3.12/core/gnome-control-center/vpn_plugins_path.patch diff --git a/pkgs/desktops/gnome-3/3.12/core/gnome-control-center/default.nix b/pkgs/desktops/gnome-3/3.12/core/gnome-control-center/default.nix index bcb49b6cafe..4a394b3b897 100644 --- a/pkgs/desktops/gnome-3/3.12/core/gnome-control-center/default.nix +++ b/pkgs/desktops/gnome-3/3.12/core/gnome-control-center/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { done ''; - patches = [ ./search_providers_dir.patch ]; + patches = [ ./search_providers_dir.patch ./vpn_plugins_path.patch ]; meta = with stdenv.lib; { description = "Single sign-on framework for GNOME"; diff --git a/pkgs/desktops/gnome-3/3.12/core/gnome-control-center/vpn_plugins_path.patch b/pkgs/desktops/gnome-3/3.12/core/gnome-control-center/vpn_plugins_path.patch new file mode 100644 index 00000000000..e25105a303f --- /dev/null +++ b/pkgs/desktops/gnome-3/3.12/core/gnome-control-center/vpn_plugins_path.patch @@ -0,0 +1,19 @@ +diff --git a/panels/network/connection-editor/vpn-helpers.c b/panels/network/connection-editor/vpn-helpers.c +index 7dc23c2..fcb1384 100644 +--- a/panels/network/connection-editor/vpn-helpers.c ++++ b/panels/network/connection-editor/vpn-helpers.c +@@ -95,14 +95,6 @@ vpn_get_plugins (GError **error) + if (!so_path) + goto next; + +- /* Remove any path and extension components, then reconstruct path +- * to the SO in LIBDIR +- */ +- so_name = g_path_get_basename (so_path); +- g_free (so_path); +- so_path = g_build_filename (NM_VPN_MODULE_DIR, so_name, NULL); +- g_free (so_name); +- + module = g_module_open (so_path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); + if (!module) { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Cannot load the VPN plugin which provides the "