From 2a842a1386b81159801086e53032d0cf2f580968 Mon Sep 17 00:00:00 2001 From: Matthew Harm Bekkema Date: Sat, 10 Nov 2018 13:17:04 +1000 Subject: [PATCH] Workaround for issue #44254 (Steam cannot connect to friends network) (#44602) * steam: Set TZ to detected timezone on startup Workaround for issue #44254 (Steam cannot connect to friends network) --- pkgs/games/steam/chrootenv.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix index 2762155d63c..c31b8b22216 100644 --- a/pkgs/games/steam/chrootenv.nix +++ b/pkgs/games/steam/chrootenv.nix @@ -180,6 +180,15 @@ in buildFHSUserEnv rec { ''; profile = '' + # Workaround for issue #44254 (Steam cannot connect to friends network) + # https://github.com/NixOS/nixpkgs/issues/44254 + if [ -z ''${TZ+x} ]; then + new_TZ="$(readlink -f /etc/localtime | grep -P -o '(?<=/zoneinfo/).*$')" + if [ $? -eq 0 ]; then + export TZ="$new_TZ" + fi + fi + export STEAM_RUNTIME=${if nativeOnly then "0" else "/steamrt"} '' + extraProfile;