tor-browser-bundle-bin: defaults for XAUTHORITY and DBUS_SESSION_BUS_ADDRESS

See https://github.com/NixOS/nixpkgs/issues/55082
and https://github.com/NixOS/nixpkgs/issues/20157#issuecomment-272767442
This commit is contained in:
Joachim Fasting 2019-04-17 16:25:49 +02:00
parent 0b3721588e
commit bce47ea9d5
No known key found for this signature in database
GPG Key ID: 5C204DF675C90294

View File

@ -302,10 +302,12 @@ stdenv.mkDerivation rec {
# easily generated by firefox at startup.
rm -f "\$HOME/TorBrowser/Data/Browser/profile.default"/{compatibility.ini,extensions.ini,extensions.json}
${optionalString pulseaudioSupport ''
# Figure out some envvars for pulseaudio
# XDG
: "\''${XDG_RUNTIME_DIR:=/run/user/\$(id -u)}"
: "\''${XDG_CONFIG_HOME:=\$REAL_HOME/.config}"
${optionalString pulseaudioSupport ''
# Figure out some envvars for pulseaudio
: "\''${PULSE_SERVER:=\$XDG_RUNTIME_DIR/pulse/native}"
: "\''${PULSE_COOKIE:=\$XDG_CONFIG_HOME/pulse/cookie}"
''}
@ -336,9 +338,9 @@ stdenv.mkDerivation rec {
\
TMPDIR="\''${TMPDIR:-/tmp}" \
HOME="\$HOME" \
XAUTHORITY="\''${XAUTHORITY:-}" \
XAUTHORITY="\''${XAUTHORITY:-\$HOME/.Xauthority}" \
DISPLAY="\$DISPLAY" \
DBUS_SESSION_BUS_ADDRESS="\$DBUS_SESSION_BUS_ADDRESS" \
DBUS_SESSION_BUS_ADDRESS="\''${DBUS_SESSION_BUS_ADDRESS:-unix:path=\$XDG_RUNTIME_DIR/bus}" \\
\
XDG_DATA_HOME="\$HOME/.local/share" \
XDG_DATA_DIRS="$WRAPPER_XDG_DATA_DIRS" \