depot/pkgs/development/libraries/xdg-desktop-portal/nix-pkgdatadir-env.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00: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";