2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2020-12-09 12:39:15 +00:00
|
|
|
|
|
|
|
# for update script
|
|
|
|
, writeShellScript, curl, nix-update
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
pname = "steam-runtime";
|
2020-06-02 18:00:15 +00:00
|
|
|
# from https://repo.steampowered.com/steamrt-images-scout/snapshots/
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.20210527.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://repo.steampowered.com/steamrt-images-scout/snapshots/${version}/steam-runtime.tar.xz";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "1880d1byn265w0vy5p98d8w8virnbywj707ydybj7rixhid2gzdc";
|
2020-06-18 07:06:33 +00:00
|
|
|
name = "scout-runtime-${version}.tar.gz";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out
|
2020-06-18 07:06:33 +00:00
|
|
|
tar -C $out --strip=1 -x -f $src
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-12-09 12:39:15 +00: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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The official runtime used by Steam";
|
|
|
|
homepage = "https://github.com/ValveSoftware/steam-runtime";
|
|
|
|
license = licenses.unfreeRedistributable; # Includes NVIDIA CG toolkit
|
|
|
|
maintainers = with maintainers; [ hrdinka abbradar ];
|
|
|
|
};
|
|
|
|
}
|