From 229bac0d09077a0f2eb54e5257737fd237917411 Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Tue, 8 Nov 2016 18:38:42 +0100 Subject: [PATCH] steam: Add /etc/{localtime,zoneinfo}. Some games (in my case Stardew Valley) require at least something in /etc/localtime. The actual file linked there doesn't matter as long as it's some valid timezone. --- pkgs/games/steam/chrootenv.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix index c53418b6523..125566b8428 100644 --- a/pkgs/games/steam/chrootenv.nix +++ b/pkgs/games/steam/chrootenv.nix @@ -9,11 +9,19 @@ let commonTargetPkgs = pkgs: with pkgs; - let primus2 = - if newStdcpp then primus else primus.override { + let + primus2 = if newStdcpp then primus else primus.override { stdenv = overrideInStdenv stdenv [ useOldCXXAbi ]; stdenv_i686 = overrideInStdenv pkgsi686Linux.stdenv [ useOldCXXAbi ]; }; + tzdir = "${pkgs.tzdata}/share/zoneinfo"; + # I'm not sure if this is the best way to add things like this + # to an FHSUserEnv + etc-zoneinfo = pkgs.runCommand "zoneinfo" {} '' + mkdir -p $out/etc + ln -s ${tzdir} $out/etc/zoneinfo + ln -s ${tzdir}/UTC $out/etc/localtime + ''; in [ steamPackages.steam-fonts # Errors in output without those @@ -26,6 +34,8 @@ let perl # Open URLs xdg_utils + # Zoneinfo + etc-zoneinfo ] ++ lib.optional withJava jdk ++ lib.optional withPrimus primus2; @@ -76,6 +86,7 @@ in buildFHSUserEnv rec { profile = '' export STEAM_RUNTIME=/steamrt + export TZDIR=/etc/zoneinfo ''; runScript = "steam";