Skip to content
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

Workaround for issue #44254 (Steam cannot connect to friends network) #44602

Merged
merged 4 commits into from Nov 10, 2018

Conversation

mat8913
Copy link
Contributor

@mat8913 mat8913 commented Aug 7, 2018

Motivation for this change

When /etc/localtime is a valid symlink but doesn't point directly to a zoneinfo file, Steam has trouble connecting to friends network. I've reported this upstream, maybe they'll fix it. But for now, there's this workaround.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Workaround for issue NixOS#44254 (Steam cannot connect to friends network)
pkgs/games/steam/chrootenv.nix Outdated Show resolved Hide resolved
# Workaround for issue #44254 (Steam cannot connect to friends network)
# https://github.com/NixOS/nixpkgs/issues/44254
test -z ''${TZ+x} &&
new_TZ="$(readlink -f /etc/localtime | grep -o '(?<=/zoneinfo/).*$' -P)" &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -P argument to grep could go just after grep like grep -P -o '...', that would likely make reading the code easier (as one would know that they are reading a PCRE regex before actually reading it)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the advice. I'll do that.

Makes reading the code easier, as one would know that they are reading a PCRE regex before actually reading it.
Copy link
Member

@Ekleog Ekleog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

I think this is ready for merge :)

@infinisil infinisil merged commit 2a842a1 into NixOS:master Nov 10, 2018
@infinisil
Copy link
Member

If somebody needs this to be backported, feel free to open another PR for it (with a cherry-pick -xe)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants