Overriding steam-runtime

Crusader Kings 3 started failing for me with the following error when I click on resume/play in the launcher.

./ck3: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory

I noticed that there is a newer version of the steam-runtime than what is currently in nixos-unstable so I tried to override it to see if that improved anything using the following overlay:

    (self: super: {
      steamPackages =
        super.steamPackages.overrideScope(steamSelf: steamSuper: rec {
          steam-runtime =
            steamSuper.steam-runtime.overrideAttrs(oldAttrs: rec {
              version = "0.20221019.0";
              src = super.fetchurl {
                url = "https://repo.steampowered.com/steamrt-images-scout/snapshots/${version}/steam-runtime.tar.xz";
                sha256 = "0000000000000000000000000000000000000000000000000000000000000000";
                name = "scout-runtime-${version}.tar.gz";

Note the obviously broken sha256 so I would expect the build to fail and tell me the correct sha256. But instead the build succeeds without any issues so this does not appear to actually override the steam-runtime.

I’m not super familiar with overrideScope so definitely possible that I’m using it wrong somehow. Any ideas?

The version of steam packaged with nixpkgs no longer overrides the steam runtime at all. The steam runtime is downloaded and managed by steam itself.

I think I’m confused. If the runtime is managed by steam itself what is nixpkgs/runtime.nix at 456bfbb59d98e23d0c4de0b0a8acb39c2ea4d4b4 · NixOS/nixpkgs · GitHub being used for? Afaict pkgs.steam is pkgs.steamPackages.steam-fhsenv which does reference that package.

I’m getting that from discussion on steam: many fixes by jonringer · Pull Request #157907 · NixOS/nixpkgs · GitHub and Unable to load libpangoft2-1.0.so on NixOS · Issue #2018 · ValveSoftware/Dota-2 · GitHub. Hopefully that’s helpful.