From e6bf8328806f19f8025bba23732117f7c2fb262d Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 8 Dec 2020 14:35:49 -0800 Subject: [PATCH] steamPackages.steam-runtime: add update script, fix pname --- pkgs/games/steam/runtime.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/games/steam/runtime.nix b/pkgs/games/steam/runtime.nix index 4f373b9be30..19ee34f5ca4 100644 --- a/pkgs/games/steam/runtime.nix +++ b/pkgs/games/steam/runtime.nix @@ -1,8 +1,12 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl + +# for update script +, writeShellScript, curl, nix-update +}: stdenv.mkDerivation rec { - name = "steam-runtime"; + pname = "steam-runtime"; # from https://repo.steampowered.com/steamrt-images-scout/snapshots/ version = "0.20200720.0"; @@ -17,6 +21,13 @@ stdenv.mkDerivation rec { tar -C $out --strip=1 -x -f $src ''; + passthru = { + updateScript = writeShellScript "update.sh" '' + version=$(${curl}/bin/curl https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/VERSION.txt) + ${nix-update}/bin/nix-update --version "$version" steamPackages.steam-runtime + ''; + }; + meta = with stdenv.lib; { description = "The official runtime used by Steam"; homepage = "https://github.com/ValveSoftware/steam-runtime";