Games

From NixOS Wiki
Revision as of 16:59, 19 April 2024 by Klinger (talk | contribs) (fully rewrite of article, because it was too old. Renowened Explorers is still there, I didnt check it, whether it still is useful information.)

Games starter

Games can be run by different applications. Some are able to include libraries from different plattforms.

Application Platform Remarks
Steam Steam Windows games work fine. Linux games are often incompatible due to how NixOS works.
Lutris GOG, Humble Bundle, Epic, EA App, Ubisoft Connect, Steam, Flatpak, Wine
Heroic Epic, GOG, Prime Gaming, Wine
Wine Windows applications/games often easier to use Lutris install scripts for wine applications/games
nixpgs Linux games There are several games in nixpgs. You can install them directly, e.g. vintagestory, flightgear, lots of racing games.
Dosbox DOS applications/games


List of games

Renowned Explorers: International Society

Tested with version renowned_explorers_international_society_522_26056.sh from gog.com. It can be played with steam-run, but it needs some libraries that are not normally included in Steam's FHS environment. One way to solve this is to add an overlay:

  nixpkgs.overlays = [
    (self: super: {
      steam-run = (super.steam.override {
        extraLibraries = pkgs: with pkgs;
          [
            libxkbcommon
            mesa
            wayland
            (sndio.overrideAttrs (old: {
              postFixup = old.postFixup + ''
                ln -s $out/lib/libsndio.so $out/lib/libsndio.so.6.1
              '';
            }))
          ];
      }).run;
    })
  ];

Adding libxkbcommon, mesa, and wayland is straightforward. The game expects the shared library sdnio.so.6.1 to exist, so we need to create a symbolic link after the installation of sndio.