xdg-desktop-poral: remove broken NIX_XDG_DESKTOP_PORTAL_DIR patch (#529088)

This commit is contained in:
Jan Tojnar
2026-07-23 11:29:17 +00:00
committed by GitHub
4 changed files with 6 additions and 17 deletions

View File

@@ -77,6 +77,12 @@
- A number of options for `services.llama-cpp` have been removed in favor of the structured [](#opt-services.llama-cpp.settings) option, attributes from which are used as arguments to `llama-server` executable, you can see all available options by running `llama-server --help`. Configuring model presets using Nix attribute set via `services.llama-cpp.modelsPreset` is no longer supported, please use `services.llama-cpp.settings.models-preset` with a path to an INI file containing desired options.
- The `NIX_XDG_DESKTOP_PORTAL_DIR` environment variable is no longer used in the `xdg-desktop-portal` package and is therefore no longer set in `xdg.portal` module.
Instead the `XDG_DATA_DIRS` environment variable is used to find xdg-portals.
If you were relying on `NIX_XDG_DESKTOP_PORTAL_DIR` to point at custom portal
definitions, add the package providing them to `xdg.portal.extraPortals`.
- Python 2 has been removed from the top-level package set, as it is long past end-of-life. The `python2`, `python27`, `python2Full`, `python27Full`, `python2Packages`, and `python27Packages` attributes, along with the legacy `python`, `pythonFull`, and `pythonPackages` aliases, now throw an error directing you to `python3`. The `isPy2` and `isPy27` package flags have been removed accordingly. The only remaining Python 2 interpreter is vendored inside the `resholve` package for its `oil` dependency and is not exposed for general use.
- `security.polkit.enablePkexecWrapper` has been introduced, making the `pkexec` setuid wrapper opt-in.

View File

@@ -150,7 +150,6 @@ in
sessionVariables = {
NIXOS_XDG_OPEN_USE_PORTAL = mkIf cfg.xdgOpenUsePortal "1";
NIX_XDG_DESKTOP_PORTAL_DIR = "/run/current-system/sw/share/xdg-desktop-portal/portals";
};
etc = lib.concatMapAttrs (

View File

@@ -1,11 +0,0 @@
--- a/src/xdp-portal-impl.c
+++ b/src/xdp-portal-impl.c
@@ -277,6 +277,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)
{

View File

@@ -76,11 +76,6 @@ stdenv.mkDerivation (finalAttrs: {
# Allow installing installed tests to a separate output.
./installed-tests-path.patch
# Look for portal definitions under path from `NIX_XDG_DESKTOP_PORTAL_DIR` environment variable.
# While upstream has `XDG_DESKTOP_PORTAL_DIR`, it is meant for tests and actually blocks
# any configs from being loaded from anywhere else.
./nix-pkgdatadir-env.patch
# test tries to read /proc/cmdline, which is not intended to be accessible in the sandbox
./trash-test.patch
];