2021-01-11 10:54:33 +03:00
|
|
|
{ lib, stdenv, fetchurl
|
2020-12-09 01:35:49 +03:00
|
|
|
|
|
|
|
# for update script
|
|
|
|
, writeShellScript, curl, nix-update
|
|
|
|
}:
|
2015-08-06 20:06:38 +03:00
|
|
|
|
2024-04-27 16:21:17 +03:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-05-08 10:32:02 +03:00
|
|
|
|
2020-12-09 01:35:49 +03:00
|
|
|
pname = "steam-runtime";
|
2021-10-06 07:44:44 +03:00
|
|
|
# from https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/VERSION.txt
|
2024-05-11 02:05:59 +03:00
|
|
|
version = "0.20240415.84615";
|
2015-08-06 20:06:38 +03:00
|
|
|
|
2020-06-14 00:41:22 +03:00
|
|
|
src = fetchurl {
|
2024-04-27 16:21:17 +03:00
|
|
|
url = "https://repo.steampowered.com/steamrt-images-scout/snapshots/${finalAttrs.version}/steam-runtime.tar.xz";
|
2024-05-11 02:05:59 +03:00
|
|
|
hash = "sha256-C8foNnIVA+O4YwuCrIf9N6Lr/GlApPVgZsYgi+3OZUE=";
|
2024-04-27 16:21:17 +03:00
|
|
|
name = "scout-runtime-${finalAttrs.version}.tar.gz";
|
2020-06-14 00:41:22 +03:00
|
|
|
};
|
2015-08-06 20:06:38 +03:00
|
|
|
|
2015-10-20 17:08:44 +03:00
|
|
|
buildCommand = ''
|
2015-08-06 20:06:38 +03:00
|
|
|
mkdir -p $out
|
2020-06-14 00:41:22 +03:00
|
|
|
tar -C $out --strip=1 -x -f $src
|
2015-08-06 20:06:38 +03:00
|
|
|
'';
|
|
|
|
|
2020-12-09 01:35:49 +03: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)
|
2023-11-16 23:42:13 +03:00
|
|
|
${lib.getExe nix-update} --version "$version" steamPackages.steam-runtime
|
2020-12-09 01:35:49 +03:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-04-27 16:21:17 +03:00
|
|
|
meta = {
|
2015-08-06 20:06:38 +03:00
|
|
|
description = "Official runtime used by Steam";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://github.com/ValveSoftware/steam-runtime";
|
2024-04-27 16:21:17 +03:00
|
|
|
license = lib.licenses.unfreeRedistributable; # Includes NVIDIA CG toolkit
|
|
|
|
maintainers = with lib.maintainers; [ hrdinka abbradar ];
|
2015-08-06 20:06:38 +03:00
|
|
|
};
|
2024-04-27 16:21:17 +03:00
|
|
|
})
|