2021-01-10 23:54:33 -08:00
|
|
|
{ lib, stdenv, fetchurl
|
2020-12-08 14:35:49 -08:00
|
|
|
|
|
|
|
# for update script
|
|
|
|
, writeShellScript, curl, nix-update
|
|
|
|
}:
|
2015-08-06 10:06:38 -07:00
|
|
|
|
2020-05-07 23:31:00 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2020-05-08 00:32:02 -07:00
|
|
|
|
2020-12-08 14:35:49 -08:00
|
|
|
pname = "steam-runtime";
|
2020-05-07 23:31:00 -07:00
|
|
|
# from https://repo.steampowered.com/steamrt-images-scout/snapshots/
|
2020-12-08 15:19:14 -08:00
|
|
|
version = "0.20201203.1";
|
2015-08-06 10:06:38 -07:00
|
|
|
|
2020-06-13 14:41:22 -07:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://repo.steampowered.com/steamrt-images-scout/snapshots/${version}/steam-runtime.tar.xz";
|
2020-12-08 15:19:14 -08:00
|
|
|
sha256 = "sha256-hOHfMi0x3K82XM3m/JmGYbVk5RvuHG+m275eAC0MoQc=";
|
2020-06-13 14:41:22 -07:00
|
|
|
name = "scout-runtime-${version}.tar.gz";
|
|
|
|
};
|
2015-08-06 10:06:38 -07:00
|
|
|
|
2015-10-20 07:08:44 -07:00
|
|
|
buildCommand = ''
|
2015-08-06 10:06:38 -07:00
|
|
|
mkdir -p $out
|
2020-06-13 14:41:22 -07:00
|
|
|
tar -C $out --strip=1 -x -f $src
|
2015-08-06 10:06:38 -07:00
|
|
|
'';
|
|
|
|
|
2020-12-08 14:35:49 -08:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2015-08-06 10:06:38 -07:00
|
|
|
description = "The official runtime used by Steam";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/ValveSoftware/steam-runtime";
|
2015-10-20 07:08:44 -07:00
|
|
|
license = licenses.unfreeRedistributable; # Includes NVIDIA CG toolkit
|
|
|
|
maintainers = with maintainers; [ hrdinka abbradar ];
|
2015-08-06 10:06:38 -07:00
|
|
|
};
|
|
|
|
}
|