depot/third_party/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/nix-pkgdatadir-env.patch
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

13 lines
469 B
Diff

diff --git a/src/portal-impl.c b/src/portal-impl.c
index 85b3a23..6d43636 100644
--- a/src/portal-impl.c
+++ b/src/portal-impl.c
@@ -275,6 +275,8 @@ load_installed_portals (gboolean opt_verbose)
/* We need to override this in the tests */
portal_dir = g_getenv ("XDG_DESKTOP_PORTAL_DIR");
+ if (portal_dir == NULL)
+ portal_dir = g_getenv ("NIX_XDG_DESKTOP_PORTAL_DIR");
if (portal_dir == NULL)
portal_dir = DATADIR "/xdg-desktop-portal/portals";