-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't add paths to XDG_DATA_DIRS before /run/current-system/sw/share #282076
Comments
I think all code like export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:$XDG_DATA_DIRS should be changed to export XDG_DATA_DIRS=$XDG_DATA_DIRS:${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} to avoid this bug. |
While the first entry in |
Why we don't make all ❯ perl -p -e's/:/\n/g' <<< $XDG_DATA_DIRS
# All paths not prefixed `/nix/store`
/run/current-system/sw/share
/home/wzy/.nix-profile/share
/nix/profile/share
/home/wzy/.local/state/nix/profile/share
/etc/profiles/per-user/wzy/share
/nix/var/nix/profiles/default/share
/run/current-system/sw/share
# All paths prefixed `/nix/store`
/nix/store/46g6vlqrxd80v4mz7hlvvhibbhyym8v9-gnome-mimeapps/share
/nix/store/s2z7sf8vs420i0l8c45brgpmv49kh38q-desktops/share
/nix/store/xfb4mv7zabj9wwfqy21yxmvkxbnnvrbz-gnome-shell-45.3/share/gsettings-schemas/gnome-shell-45.3
/nix/store/q5bflv6km2d30f3hsz63ggmn7plyql7l-gnome-shell-extensions-45.2/share/gsettings-schemas/gnome-shell-extensions-45.2
/nix/store/wcfb9jx6v9dj2k625qd0ki0n33jbrbjr-gnome-session-45.0/share
/nix/store/gfp30ph6l28vz62ggcl7j2b5sp22j1hy-gsettings-desktop-schemas-45.0/share/gsettings-schemas/gsettings-desktop-schemas-45.0
/nix/store/8yicinmsnqmlkgvmzh468bi0bsap0fix-gtk+3-3.24.39/share/gsettings-schemas/gtk+3-3.24.39
/nix/store/0d8y8z780dpn9lnn3gw6bmyax1hf5x9f-gnome-settings-daemon-45.1/share/gsettings-schemas/gnome-settings-daemon-45.1
/nix/store/wcfb9jx6v9dj2k625qd0ki0n33jbrbjr-gnome-session-45.0/share/gsettings-schemas/gnome-session-45.0
/nix/store/xfb4mv7zabj9wwfqy21yxmvkxbnnvrbz-gnome-shell-45.3/share
/nix/store/0d8y8z780dpn9lnn3gw6bmyax1hf5x9f-gnome-settings-daemon-45.1/share
/nix/store/gfp30ph6l28vz62ggcl7j2b5sp22j1hy-gsettings-desktop-schemas-45.0/share/gsettings-schemas/gsettings-desktop-schemas-45.0
/nix/store/8yicinmsnqmlkgvmzh468bi0bsap0fix-gtk+3-3.24.39/share/gsettings-schemas/gtk+3-3.24.39
/nix/store/srry3z6y26hvdr46v13sl0i20n9nkvic-libgnomekbd-3.28.1/share/gsettings-schemas/libgnomekbd-3.28.1
/nix/store/fv3hq3i74vqx20lni9lzr84h4qnvys3v-colord-1.4.6/share/gsettings-schemas/colord-1.4.6
/nix/store/yjjcyrvm46j7q7z50fnl1wnrbh86fkid-libgweather-4.4.0/share/gsettings-schemas/libgweather-4.4.0
/nix/store/0d8y8z780dpn9lnn3gw6bmyax1hf5x9f-gnome-settings-daemon-45.1/share/gsettings-schemas/gnome-settings-daemon-45.1 In different languages, there are different libraries to support XDG. At least we do some change to make all |
Yeah, I think
The reason why wrappers prefix derivation’s own paths to environment variables is to make the derivations more hermetic. If global paths took precedence, apps would load possibly inconsistent global data. |
Hey, the maintainers of platformdirs @gaborbernat, @ofek, How can we get global path |
Looking at the |
Actual Behavior
Expected Behavior
Technical details
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result."x86_64-linux"
Linux 6.7.0, NixOS, 24.05 (Uakari), 24.05pre572380.842d9d80cfd4
yes
yes
nix-env (Nix) 2.18.1
"json-c-0.16, librime-1.8.5"
"nixos"
/nix/var/nix/profiles/per-user/root/channels/nixos
The text was updated successfully, but these errors were encountered: