From 2eb94bdbb8b2c981b3194cb5d073e4a37c42fef2 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Mon, 22 Jul 2019 16:01:44 -0400 Subject: [PATCH] xdg-desktop-portal: 1.2.0 -> 1.4.2 * adapt respect-path-env-var.patch to code being moved around, etc. * Add json-glib https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.4.0 --- .../libraries/xdg-desktop-portal/default.nix | 8 ++++---- .../respect-path-env-var.patch | 20 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/xdg-desktop-portal/default.nix b/pkgs/development/libraries/xdg-desktop-portal/default.nix index 3f02946c7704..4be7bd1474cf 100644 --- a/pkgs/development/libraries/xdg-desktop-portal/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fontconfig, flatpak, gsettings-desktop-schemas, acl, dbus, fuse, geoclue2, wrapGAppsHook }: +{ stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fontconfig, flatpak, gsettings-desktop-schemas, acl, dbus, fuse, geoclue2, json-glib, wrapGAppsHook }: stdenv.mkDerivation rec { pname = "xdg-desktop-portal"; - version = "1.2.0"; + version = "1.4.2"; outputs = [ "out" "installedTests" ]; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { owner = "flatpak"; repo = pname; rev = version; - sha256 = "1gjyif4gly0mkdx6ir6wc4vhfh1raah9jq03q28i88hr7phjdy71"; + sha256 = "1rs3kmpczkr6nm08kb9njnl7n3rmhh0ral0xav6f0y70pyh8whx6"; }; patches = [ @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ autoreconfHook pkgconfig libxml2 wrapGAppsHook ]; - buildInputs = [ glib pipewire fontconfig flatpak acl dbus geoclue2 fuse gsettings-desktop-schemas ]; + buildInputs = [ glib pipewire fontconfig flatpak acl dbus geoclue2 fuse gsettings-desktop-schemas json-glib ]; doCheck = true; # XXX: investigate! diff --git a/pkgs/development/libraries/xdg-desktop-portal/respect-path-env-var.patch b/pkgs/development/libraries/xdg-desktop-portal/respect-path-env-var.patch index f884899ecd19..d970f5636ae4 100644 --- a/pkgs/development/libraries/xdg-desktop-portal/respect-path-env-var.patch +++ b/pkgs/development/libraries/xdg-desktop-portal/respect-path-env-var.patch @@ -1,10 +1,12 @@ ---- a/src/xdg-desktop-portal.c -+++ b/src/xdg-desktop-portal.c -@@ -177,38 +177,50 @@ - static void - load_installed_portals (void) +diff --git a/src/portal-impl.c b/src/portal-impl.c +index 4fd48ff..346da7c 100644 +--- a/src/portal-impl.c ++++ b/src/portal-impl.c +@@ -116,38 +116,50 @@ sort_impl_by_name (gconstpointer a, + void + load_installed_portals (gboolean opt_verbose) { -- const char *portal_dir = PKGDATADIR "/portals"; +- const char *portal_dir = DATADIR "/xdg-desktop-portal/portals"; - g_autoptr(GFile) dir = g_file_new_for_path (portal_dir); - g_autoptr(GFileEnumerator) enumerator = NULL; @@ -14,7 +16,7 @@ + const char *portal_dir = g_getenv ("XDG_DESKTOP_PORTAL_PATH"); + + if (portal_dir == NULL) -+ portal_dir = PKGDATADIR "/portals"; ++ portal_dir = DATADIR "/portals"; - if (enumerator == NULL) - return; @@ -56,7 +58,7 @@ - path = g_file_get_path (child); + name = g_file_info_get_name (info); -- if (!register_portal (path, &error)) +- if (!register_portal (path, opt_verbose, &error)) - { - g_warning ("Error loading %s: %s", path, error->message); - continue; @@ -66,7 +68,7 @@ + child = g_file_enumerator_get_child (enumerator, info); + path = g_file_get_path (child); + -+ if (!register_portal (path, &error)) ++ if (!register_portal (path, opt_verbose, &error)) + { + g_warning ("Error loading %s: %s", path, error->message); + continue;