steamPackages.steam-runtime: add update script, fix pname

This commit is contained in:
Jonathan Ringer 2020-12-08 14:35:49 -08:00 committed by Jonathan Ringer
parent f38256e2eb
commit e6bf832880

View file

@ -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";