diff options
author | Robert Hensing <robert@roberthensing.nl> | 2020-11-13 01:12:37 +0100 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2020-11-25 08:44:04 -0800 |
commit | 84c58abdc4cacdf4cf5a65faff74421bc983f161 (patch) | |
tree | b2735985f7b023a4d0bbfe906fa641a0badd6195 | |
parent | 0f13cccb95523a0dacb58c47aeac2c1d86af75f8 (diff) |
setup.sh: Only load XDG_DATA_DIRS for executable inputs
This avoids the scenario where strictDeps is off and cross-compiled
XDG_DATA_DIRS content is brought into the environment.
While probably harmless for data like manpages and completion scripts,
this would cause issues when XDG_DATA_DIRS is used to find executables
or plugins. The Qt framework is known to behave like this and might
have run into incompatibilities.
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 34405b048ecb..6affe2ed2bbe 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -485,6 +485,9 @@ activatePackage() { # TODO(@Ericson2314): Don't special-case native compilation if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then addToSearchPath _PATH "$pkg/bin" + fi + + if [[ "$hostOffset" -le -1 ]]; then addToSearchPath _XDG_DATA_DIRS "$pkg/share" fi |