Unverified Commit ae94c98d authored by K900's avatar K900 Committed by GitHub
Browse files

steam: restore and document timezone hack (#379633)

parents 9855e763 11ab3e5d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -89,6 +89,15 @@ let
      export LIBVA_DRIVERS_PATH=/run/opengl-driver/lib/dri:/run/opengl-driver-32/lib/dri
      export VDPAU_DRIVER_PATH=/run/opengl-driver/lib/vdpau:/run/opengl-driver-32/lib/vdpau

      # Steam gets confused by the symlinks to bind mounts to symlinks /etc/localtime ends up being, so help it out.
      # See also: https://github.com/flathub/com.valvesoftware.Steam/blob/28481f09f33c12b6ac7421d13af9ed1523c54ec4/steam_wrapper/steam_wrapper.py#L160
      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

      set -a
      ${lib.toShellVars extraEnv}
      set +a