about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/nix-pkgdatadir-env.patch
blob: b099c4ad56f5b6a40e44c147b8a0f0d5f5efa24b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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";