nixpkgs/pkgs/games/steam/runtime.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl
# for update script
, writeShellScript, curl, nix-update
}:
2015-08-06 20:06:38 +03:00
stdenv.mkDerivation (finalAttrs: {
2020-05-08 10:32:02 +03:00
pname = "steam-runtime";
# from https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/VERSION.txt
version = "0.20240415.84615";
2015-08-06 20:06:38 +03:00
src = fetchurl {
url = "https://repo.steampowered.com/steamrt-images-scout/snapshots/${finalAttrs.version}/steam-runtime.tar.xz";
hash = "sha256-C8foNnIVA+O4YwuCrIf9N6Lr/GlApPVgZsYgi+3OZUE=";
name = "scout-runtime-${finalAttrs.version}.tar.gz";
};
2015-08-06 20:06:38 +03:00
buildCommand = ''
2015-08-06 20:06:38 +03:00
mkdir -p $out
tar -C $out --strip=1 -x -f $src
2015-08-06 20:06:38 +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
'';
};
meta = {
2015-08-06 20:06:38 +03:00
description = "Official runtime used by Steam";
homepage = "https://github.com/ValveSoftware/steam-runtime";
license = lib.licenses.unfreeRedistributable; # Includes NVIDIA CG toolkit
maintainers = with lib.maintainers; [ hrdinka abbradar ];
2015-08-06 20:06:38 +03:00
};
})