3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/games/steam/runtime.nix

38 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl
# for update script
, writeShellScript, curl, nix-update
}:
2015-08-06 18:06:38 +01:00
stdenv.mkDerivation rec {
2020-05-08 08:32:02 +01:00
pname = "steam-runtime";
# from https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/VERSION.txt
version = "0.20210906.1";
2015-08-06 18:06:38 +01:00
src = fetchurl {
url = "https://repo.steampowered.com/steamrt-images-scout/snapshots/${version}/steam-runtime.tar.xz";
sha256 = "1dkynar5y4q0pi32ihdhl7r81v9jxsb7lhc91mqhy43f6462qz1h";
name = "scout-runtime-${version}.tar.gz";
};
2015-08-06 18:06:38 +01:00
buildCommand = ''
2015-08-06 18:06:38 +01:00
mkdir -p $out
tar -C $out --strip=1 -x -f $src
2015-08-06 18:06:38 +01: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
'';
};
meta = with lib; {
2015-08-06 18:06:38 +01: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 ];
2015-08-06 18:06:38 +01:00
};
}