about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorstuebinm <stuebinm@disroot.org>2024-03-19 03:14:51 +0100
committerstuebinm <stuebinm@disroot.org>2024-03-19 03:14:51 +0100
commitff1a94e523ae9fb272e0581f068baee5d1068476 (patch)
treecbea47f2004a4fa8685163d630612cf748e72c1e /pkgs/games
parentb06025f1533a1e07b6db3e75151caa155d1c7eb3 (diff)
treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/2048-in-terminal/default.nix1
-rw-r--r--pkgs/games/20kly/default.nix1
-rw-r--r--pkgs/games/90secondportraits/default.nix1
-rw-r--r--pkgs/games/BeatSaberModManager/default.nix1
-rw-r--r--pkgs/games/abbaye-des-morts/default.nix1
-rw-r--r--pkgs/games/airshipper/default.nix1
-rw-r--r--pkgs/games/airstrike/default.nix1
-rw-r--r--pkgs/games/among-sus/default.nix1
-rw-r--r--pkgs/games/angband/default.nix1
-rw-r--r--pkgs/games/animatch/default.nix1
-rw-r--r--pkgs/games/anki/default.nix1
-rw-r--r--pkgs/games/antsimulator/default.nix1
-rw-r--r--pkgs/games/armagetronad/default.nix1
-rw-r--r--pkgs/games/atanks/default.nix1
-rw-r--r--pkgs/games/augustus/default.nix1
-rw-r--r--pkgs/games/azimuth/default.nix1
-rw-r--r--pkgs/games/ballerburg/default.nix1
-rw-r--r--pkgs/games/banner/default.nix1
-rw-r--r--pkgs/games/bastet/default.nix1
-rw-r--r--pkgs/games/black-hole-solver/default.nix1
-rw-r--r--pkgs/games/blightmud/default.nix1
-rw-r--r--pkgs/games/blobwars/default.nix1
-rw-r--r--pkgs/games/blockattack/default.nix1
-rw-r--r--pkgs/games/boohu/default.nix1
-rw-r--r--pkgs/games/braincurses/default.nix1
-rw-r--r--pkgs/games/brogue-ce/default.nix1
-rw-r--r--pkgs/games/brogue/default.nix1
-rw-r--r--pkgs/games/brutalmaze/default.nix1
-rw-r--r--pkgs/games/cataclysm-dda/common.nix1
-rw-r--r--pkgs/games/cbonsai/default.nix1
-rw-r--r--pkgs/games/cgoban/default.nix1
-rw-r--r--pkgs/games/chromium-bsu/default.nix1
-rw-r--r--pkgs/games/ckan/default.nix1
-rw-r--r--pkgs/games/construo/default.nix1
-rw-r--r--pkgs/games/corsix-th/default.nix1
-rw-r--r--pkgs/games/crack-attack/default.nix1
-rw-r--r--pkgs/games/crossfire/crossfire-client.nix1
-rw-r--r--pkgs/games/crrcsim/default.nix1
-rw-r--r--pkgs/games/cutemaze/default.nix1
-rw-r--r--pkgs/games/cuyo/default.nix1
-rw-r--r--pkgs/games/devilutionx/default.nix1
-rw-r--r--pkgs/games/doom-ports/dhewm3/default.nix1
-rw-r--r--pkgs/games/doom-ports/doomretro/default.nix1
-rw-r--r--pkgs/games/doom-ports/doomrunner/default.nix1
-rw-r--r--pkgs/games/doom-ports/doomseeker/default.nix1
-rw-r--r--pkgs/games/doom-ports/enyo-launcher/default.nix1
-rw-r--r--pkgs/games/doom-ports/eternity-engine/default.nix1
-rw-r--r--pkgs/games/doom-ports/eureka-editor/default.nix1
-rw-r--r--pkgs/games/doom-ports/gzdoom/default.nix1
-rw-r--r--pkgs/games/doom-ports/rbdoom-3-bfg/default.nix1
-rw-r--r--pkgs/games/doom-ports/zandronum/default.nix1
-rw-r--r--pkgs/games/doom-ports/zdoom/bcc-git.nix1
-rw-r--r--pkgs/games/doom-ports/zdoom/zdbsp.nix1
-rw-r--r--pkgs/games/dwarf-fortress/dwarf-therapist/default.nix1
-rw-r--r--pkgs/games/ecwolf/default.nix1
-rw-r--r--pkgs/games/eidolon/default.nix1
-rw-r--r--pkgs/games/empty-epsilon/default.nix1
-rw-r--r--pkgs/games/endless-sky/default.nix1
-rw-r--r--pkgs/games/enigma/default.nix1
-rw-r--r--pkgs/games/ezquake/default.nix1
-rw-r--r--pkgs/games/fairymax/default.nix1
-rw-r--r--pkgs/games/ferium/default.nix1
-rw-r--r--pkgs/games/fheroes2/default.nix1
-rw-r--r--pkgs/games/fish-fillets-ng/default.nix1
-rw-r--r--pkgs/games/flare/default.nix1
-rw-r--r--pkgs/games/freedroid/default.nix1
-rw-r--r--pkgs/games/freedroidrpg/default.nix1
-rw-r--r--pkgs/games/freesweep/default.nix1
-rw-r--r--pkgs/games/frotz/default.nix1
-rw-r--r--pkgs/games/fsg/default.nix1
-rw-r--r--pkgs/games/gambit/default.nix1
-rw-r--r--pkgs/games/garden-of-coloured-lights/default.nix1
-rw-r--r--pkgs/games/gargoyle/default.nix1
-rw-r--r--pkgs/games/gav/default.nix1
-rw-r--r--pkgs/games/gl-117/default.nix1
-rw-r--r--pkgs/games/gl-gsync-demo/default.nix1
-rw-r--r--pkgs/games/globulation/default.nix1
-rw-r--r--pkgs/games/gltron/default.nix1
-rw-r--r--pkgs/games/gnome-hexgl/default.nix1
-rw-r--r--pkgs/games/gnonograms/default.nix1
-rw-r--r--pkgs/games/gnugo/default.nix1
-rw-r--r--pkgs/games/gnujump/default.nix1
-rw-r--r--pkgs/games/gnushogi/default.nix1
-rw-r--r--pkgs/games/gogdl/default.nix1
-rw-r--r--pkgs/games/gotypist/default.nix1
-rw-r--r--pkgs/games/gshogi/default.nix1
-rw-r--r--pkgs/games/gtetrinet/default.nix1
-rw-r--r--pkgs/games/gweled/default.nix1
-rw-r--r--pkgs/games/harmonist/default.nix1
-rw-r--r--pkgs/games/hase/default.nix1
-rw-r--r--pkgs/games/hex-a-hop/default.nix1
-rw-r--r--pkgs/games/hexgui/default.nix1
-rw-r--r--pkgs/games/hmcl/default.nix1
-rw-r--r--pkgs/games/hyperrogue/default.nix1
-rw-r--r--pkgs/games/icbm3d/default.nix1
-rw-r--r--pkgs/games/infra-arcana/default.nix1
-rw-r--r--pkgs/games/instawow/default.nix1
-rw-r--r--pkgs/games/julius/default.nix1
-rw-r--r--pkgs/games/jumpy/default.nix1
-rw-r--r--pkgs/games/kabeljau/default.nix1
-rw-r--r--pkgs/games/katago/default.nix1
-rw-r--r--pkgs/games/keeperrl/default.nix1
-rw-r--r--pkgs/games/klavaro/default.nix1
-rw-r--r--pkgs/games/kobodeluxe/default.nix1
-rw-r--r--pkgs/games/koboredux/default.nix1
-rw-r--r--pkgs/games/koules/default.nix1
-rw-r--r--pkgs/games/lgogdownloader/default.nix1
-rw-r--r--pkgs/games/liberation-circuit/default.nix1
-rw-r--r--pkgs/games/libremines/default.nix1
-rw-r--r--pkgs/games/lincity/default.nix1
-rw-r--r--pkgs/games/lincity/ng.nix1
-rw-r--r--pkgs/games/linthesia/default.nix1
-rw-r--r--pkgs/games/lugaru/default.nix1
-rw-r--r--pkgs/games/lzwolf/default.nix1
-rw-r--r--pkgs/games/macopix/default.nix1
-rw-r--r--pkgs/games/maelstrom/default.nix1
-rw-r--r--pkgs/games/maptool/default.nix1
-rw-r--r--pkgs/games/mar1d/default.nix1
-rw-r--r--pkgs/games/marble-marcher-ce/default.nix1
-rw-r--r--pkgs/games/mari0/default.nix1
-rw-r--r--pkgs/games/methane/default.nix1
-rw-r--r--pkgs/games/mnemosyne/default.nix1
-rw-r--r--pkgs/games/moon-buggy/default.nix1
-rw-r--r--pkgs/games/mrrescue/default.nix1
-rw-r--r--pkgs/games/n2048/default.nix1
-rw-r--r--pkgs/games/naev/default.nix1
-rw-r--r--pkgs/games/netris/default.nix1
-rw-r--r--pkgs/games/newtonwars/default.nix1
-rw-r--r--pkgs/games/nile/default.nix1
-rw-r--r--pkgs/games/ninvaders/default.nix1
-rw-r--r--pkgs/games/njam/default.nix1
-rw-r--r--pkgs/games/npush/default.nix1
-rw-r--r--pkgs/games/nsnake/default.nix1
-rw-r--r--pkgs/games/nudoku/default.nix1
-rw-r--r--pkgs/games/oh-my-git/default.nix1
-rw-r--r--pkgs/games/onscripter-en/default.nix1
-rw-r--r--pkgs/games/opendune/default.nix1
-rw-r--r--pkgs/games/opendungeons/default.nix1
-rw-r--r--pkgs/games/openspades/default.nix1
-rw-r--r--pkgs/games/openttd/default.nix1
-rw-r--r--pkgs/games/openttd/nml.nix1
-rw-r--r--pkgs/games/opentyrian/default.nix1
-rw-r--r--pkgs/games/openxcom/default.nix1
-rw-r--r--pkgs/games/orthorobot/default.nix1
-rw-r--r--pkgs/games/pacvim/default.nix1
-rw-r--r--pkgs/games/pegasus-frontend/default.nix1
-rw-r--r--pkgs/games/performous/default.nix1
-rw-r--r--pkgs/games/pingus/default.nix1
-rw-r--r--pkgs/games/pokerth/default.nix1
-rw-r--r--pkgs/games/pokete/default.nix1
-rw-r--r--pkgs/games/powermanga/default.nix1
-rw-r--r--pkgs/games/principia/default.nix1
-rw-r--r--pkgs/games/pro-office-calculator/default.nix1
-rw-r--r--pkgs/games/pysolfc/default.nix1
-rw-r--r--pkgs/games/qgo/default.nix1
-rw-r--r--pkgs/games/qqwing/default.nix1
-rw-r--r--pkgs/games/qtads/default.nix1
-rw-r--r--pkgs/games/quakespasm/vulkan.nix1
-rw-r--r--pkgs/games/quantumminigolf/default.nix1
-rw-r--r--pkgs/games/racer/default.nix1
-rw-r--r--pkgs/games/randtype/default.nix1
-rw-r--r--pkgs/games/riko4/default.nix1
-rw-r--r--pkgs/games/rocksndiamonds/default.nix1
-rw-r--r--pkgs/games/rogue/default.nix1
-rw-r--r--pkgs/games/rott/default.nix1
-rw-r--r--pkgs/games/rpg-cli/default.nix1
-rw-r--r--pkgs/games/rrootage/default.nix1
-rw-r--r--pkgs/games/scummvm/default.nix1
-rw-r--r--pkgs/games/sfrotz/default.nix1
-rw-r--r--pkgs/games/shticker-book-unwritten/default.nix1
-rw-r--r--pkgs/games/sienna/default.nix1
-rw-r--r--pkgs/games/sil-q/default.nix1
-rw-r--r--pkgs/games/simutrans/default.nix1
-rw-r--r--pkgs/games/snipes/default.nix1
-rw-r--r--pkgs/games/soi/default.nix1
-rw-r--r--pkgs/games/solicurses/default.nix1
-rw-r--r--pkgs/games/space-orbit/default.nix1
-rw-r--r--pkgs/games/stardust/default.nix1
-rw-r--r--pkgs/games/steam/fhsenv.nix1
-rw-r--r--pkgs/games/stockfish/default.nix1
-rw-r--r--pkgs/games/super-tux-kart/default.nix1
-rw-r--r--pkgs/games/system-syzygy/default.nix1
-rw-r--r--pkgs/games/taisei/default.nix1
-rw-r--r--pkgs/games/tecnoballz/default.nix1
-rw-r--r--pkgs/games/teeworlds/default.nix1
-rw-r--r--pkgs/games/tennix/default.nix1
-rw-r--r--pkgs/games/tes3cmd/default.nix1
-rw-r--r--pkgs/games/the-butterfly-effect/default.nix1
-rw-r--r--pkgs/games/theforceengine/default.nix1
-rw-r--r--pkgs/games/tinyfugue/default.nix1
-rw-r--r--pkgs/games/titanion/default.nix1
-rw-r--r--pkgs/games/tome4/default.nix1
-rw-r--r--pkgs/games/torus-trooper/default.nix1
-rw-r--r--pkgs/games/tr-patcher/default.nix1
-rw-r--r--pkgs/games/trackballs/default.nix1
-rw-r--r--pkgs/games/trigger/default.nix1
-rw-r--r--pkgs/games/tumiki-fighters/default.nix1
-rw-r--r--pkgs/games/tuxtype/default.nix1
-rw-r--r--pkgs/games/typespeed/default.nix1
-rw-r--r--pkgs/games/uchess/default.nix1
-rw-r--r--pkgs/games/ultrastardx/default.nix1
-rw-r--r--pkgs/games/umoria/default.nix1
-rw-r--r--pkgs/games/unnethack/default.nix1
-rw-r--r--pkgs/games/uqm/default.nix1
-rw-r--r--pkgs/games/vdrift/default.nix1
-rw-r--r--pkgs/games/vectoroids/default.nix1
-rw-r--r--pkgs/games/vms-empire/default.nix1
-rw-r--r--pkgs/games/warzone2100/default.nix1
-rw-r--r--pkgs/games/wireworld/default.nix1
-rw-r--r--pkgs/games/wolfstoneextract/default.nix1
-rw-r--r--pkgs/games/wyvern/default.nix1
-rw-r--r--pkgs/games/xboard/default.nix1
-rw-r--r--pkgs/games/xbomb/default.nix1
-rw-r--r--pkgs/games/xgalaga++/default.nix1
-rw-r--r--pkgs/games/xjump/default.nix1
-rw-r--r--pkgs/games/xmage/default.nix1
-rw-r--r--pkgs/games/xmoto/default.nix1
-rw-r--r--pkgs/games/xpilot/bloodspilot-client.nix1
-rw-r--r--pkgs/games/xpilot/bloodspilot-server.nix1
-rw-r--r--pkgs/games/xskat/default.nix1
-rw-r--r--pkgs/games/xsnow/default.nix1
-rw-r--r--pkgs/games/xsok/default.nix1
-rw-r--r--pkgs/games/xsokoban/default.nix1
223 files changed, 223 insertions, 0 deletions
diff --git a/pkgs/games/2048-in-terminal/default.nix b/pkgs/games/2048-in-terminal/default.nix
index 2ffefb6011256..e7347c8fe880e 100644
--- a/pkgs/games/2048-in-terminal/default.nix
+++ b/pkgs/games/2048-in-terminal/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     inherit (src.meta) homepage;
     description = "Animated console version of the 2048 game";
+    mainProgram = "2048-in-terminal";
     license = licenses.mit;
     platforms = platforms.unix;
   };
diff --git a/pkgs/games/20kly/default.nix b/pkgs/games/20kly/default.nix
index 0cc61367e28ec..c2ab350195162 100644
--- a/pkgs/games/20kly/default.nix
+++ b/pkgs/games/20kly/default.nix
@@ -39,6 +39,7 @@ python3Packages.buildPythonApplication rec {
 
   meta = with lib; {
     description = "A steampunk-themed strategy game where you have to manage a steam supply network";
+    mainProgram = "lightyears";
     homepage = "http://jwhitham.org.uk/20kly/";
     license = licenses.gpl2Only;
     maintainers = with maintainers; [ fgaz ];
diff --git a/pkgs/games/90secondportraits/default.nix b/pkgs/games/90secondportraits/default.nix
index fd6bb92399381..4e8cd387a0e14 100644
--- a/pkgs/games/90secondportraits/default.nix
+++ b/pkgs/games/90secondportraits/default.nix
@@ -43,6 +43,7 @@ in stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A silly speed painting game";
+    mainProgram = "90secondportraits";
     maintainers = with maintainers; [ leenaars ];
     platforms = platforms.linux;
     license = licenses.free;
diff --git a/pkgs/games/BeatSaberModManager/default.nix b/pkgs/games/BeatSaberModManager/default.nix
index a4b53810244d9..5c0f73d329f24 100644
--- a/pkgs/games/BeatSaberModManager/default.nix
+++ b/pkgs/games/BeatSaberModManager/default.nix
@@ -56,6 +56,7 @@ buildDotnetModule rec {
 
   meta = with lib; {
     description = "Yet another mod installer for Beat Saber, heavily inspired by ModAssistant";
+    mainProgram = "BeatSaberModManager";
     homepage = "https://github.com/affederaffe/BeatSaberModManager";
     longDescription = ''
       BeatSaberModManager is yet another mod installer for Beat Saber, heavily inspired by ModAssistant
diff --git a/pkgs/games/abbaye-des-morts/default.nix b/pkgs/games/abbaye-des-morts/default.nix
index 3cf03ed22119b..1461c45a0b795 100644
--- a/pkgs/games/abbaye-des-morts/default.nix
+++ b/pkgs/games/abbaye-des-morts/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://locomalito.com/abbaye_des_morts.php";
     description = "A retro arcade video game";
+    mainProgram = "abbayev2";
     license = licenses.gpl3;
     maintainers = [ maintainers.marius851000 ];
   };
diff --git a/pkgs/games/airshipper/default.nix b/pkgs/games/airshipper/default.nix
index a785d6035e41f..0791aa8dfa27d 100644
--- a/pkgs/games/airshipper/default.nix
+++ b/pkgs/games/airshipper/default.nix
@@ -114,6 +114,7 @@ rustPlatform.buildRustPackage {
 
   meta = with lib; {
     description = "Provides automatic updates for the voxel RPG Veloren";
+    mainProgram = "airshipper";
     homepage = "https://www.veloren.net";
     license = licenses.gpl3;
     maintainers = with maintainers; [ yusdacra ];
diff --git a/pkgs/games/airstrike/default.nix b/pkgs/games/airstrike/default.nix
index 8441ac7a2feef..63b2686e97c95 100644
--- a/pkgs/games/airstrike/default.nix
+++ b/pkgs/games/airstrike/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A 2d dogfighting game";
+    mainProgram = "airstrike";
     homepage = "https://icculus.org/airstrike/";
     license = licenses.gpl2;
     maintainers = with maintainers; [ pSub ];
diff --git a/pkgs/games/among-sus/default.nix b/pkgs/games/among-sus/default.nix
index be9ecc7adf57e..d53d98f5e7afa 100644
--- a/pkgs/games/among-sus/default.nix
+++ b/pkgs/games/among-sus/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation {
   meta = with lib; {
     homepage = "https://git.sr.ht/~martijnbraam/among-sus";
     description = "Among us, but it's a text adventure";
+    mainProgram = "among-sus";
     license = licenses.agpl3Plus;
     maintainers = [ maintainers.eyjhb ];
     platforms = platforms.unix;
diff --git a/pkgs/games/angband/default.nix b/pkgs/games/angband/default.nix
index 24348460d3b5d..1d3ac929d337b 100644
--- a/pkgs/games/angband/default.nix
+++ b/pkgs/games/angband/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "https://angband.github.io/angband";
     description = "A single-player roguelike dungeon exploration game";
+    mainProgram = "angband";
     maintainers = [ maintainers.kenran ];
     license = licenses.gpl2;
     platforms = platforms.unix;
diff --git a/pkgs/games/animatch/default.nix b/pkgs/games/animatch/default.nix
index b6bf5473807c8..261612374ace1 100644
--- a/pkgs/games/animatch/default.nix
+++ b/pkgs/games/animatch/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://gitlab.com/HolyPangolin/animatch/";
     description = "A cute match three game for the Librem 5 smartphone";
+    mainProgram = "animatch";
     license = with lib.licenses; [ gpl3Plus ];
     maintainers = with lib.maintainers; [ colinsane ];
   };
diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix
index 3cd623c4d6ef2..eca62c640bcf6 100644
--- a/pkgs/games/anki/default.nix
+++ b/pkgs/games/anki/default.nix
@@ -277,6 +277,7 @@ python3.pkgs.buildPythonApplication {
 
   meta = with lib; {
     description = "Spaced repetition flashcard program";
+    mainProgram = "anki";
     longDescription = ''
       Anki is a program which makes remembering things easy. Because it is a lot
       more efficient than traditional study methods, you can either greatly
diff --git a/pkgs/games/antsimulator/default.nix b/pkgs/games/antsimulator/default.nix
index bac481c88f353..f6b3608314586 100644
--- a/pkgs/games/antsimulator/default.nix
+++ b/pkgs/games/antsimulator/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/johnBuffer/AntSimulator";
     description = "Simple Ants simulator";
+    mainProgram = "antsimulator";
     license = licenses.free;
     maintainers = with maintainers; [ ivar ];
     platforms = platforms.unix;
diff --git a/pkgs/games/armagetronad/default.nix b/pkgs/games/armagetronad/default.nix
index 6bcc30ac011fb..20f253dcfc2ff 100644
--- a/pkgs/games/armagetronad/default.nix
+++ b/pkgs/games/armagetronad/default.nix
@@ -176,6 +176,7 @@ let
       meta = with lib; {
         homepage = "http://armagetronad.org";
         description = "A multiplayer networked arcade racing game in 3D similar to Tron";
+        mainProgram = "armagetronad-dedicated";
         maintainers = with maintainers; [ numinit ];
         license = licenses.gpl2Plus;
         platforms = platforms.linux;
diff --git a/pkgs/games/atanks/default.nix b/pkgs/games/atanks/default.nix
index 197cadfea29cd..8a77be6f16eb6 100644
--- a/pkgs/games/atanks/default.nix
+++ b/pkgs/games/atanks/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Atomic Tanks ballistics game";
+    mainProgram = "atanks";
     homepage = "http://atanks.sourceforge.net/";
     maintainers = [ maintainers.raskin ];
     platforms = platforms.linux;
diff --git a/pkgs/games/augustus/default.nix b/pkgs/games/augustus/default.nix
index 5aec0186cfc42..1ccbd14f5f33a 100644
--- a/pkgs/games/augustus/default.nix
+++ b/pkgs/games/augustus/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An open source re-implementation of Caesar III. Fork of Julius incorporating gameplay changes";
+    mainProgram = "augustus";
     homepage = "https://github.com/Keriew/augustus";
     license = licenses.agpl3Only;
     platforms = platforms.all;
diff --git a/pkgs/games/azimuth/default.nix b/pkgs/games/azimuth/default.nix
index ed03c2afd71c9..84d50211dc372 100644
--- a/pkgs/games/azimuth/default.nix
+++ b/pkgs/games/azimuth/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A metroidvania game using only vectorial graphic";
+    mainProgram = "azimuth";
     longDescription = ''
       Azimuth is a metroidvania game, and something of an homage to the previous
       greats of the genre (Super Metroid in particular). You will need to pilot
diff --git a/pkgs/games/ballerburg/default.nix b/pkgs/games/ballerburg/default.nix
index b15abdbc4703d..c8d5fb793832f 100644
--- a/pkgs/games/ballerburg/default.nix
+++ b/pkgs/games/ballerburg/default.nix
@@ -44,6 +44,7 @@ in stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Classic cannon combat game";
+    mainProgram = "ballerburg";
     longDescription = ''
       Two castles, separated by a mountain, try to defeat each other with their cannonballs,
       either by killing the opponent's king or by weakening the opponent enough so that the king capitulates.'';
diff --git a/pkgs/games/banner/default.nix b/pkgs/games/banner/default.nix
index b98ade9dbff91..af54f59999c80 100644
--- a/pkgs/games/banner/default.nix
+++ b/pkgs/games/banner/default.nix
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/pronovic/banner";
     description = "Print large banners to ASCII terminals";
+    mainProgram = "banner";
     license = licenses.gpl2Only;
 
     longDescription = ''
diff --git a/pkgs/games/bastet/default.nix b/pkgs/games/bastet/default.nix
index 0b9f415073033..5fde8064d7553 100644
--- a/pkgs/games/bastet/default.nix
+++ b/pkgs/games/bastet/default.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Tetris clone with 'bastard' block-choosing AI";
+    mainProgram = "bastet";
     homepage = "http://fph.altervista.org/prog/bastet.html";
     license = licenses.gpl3;
     maintainers = [ maintainers.dezgeg ];
diff --git a/pkgs/games/black-hole-solver/default.nix b/pkgs/games/black-hole-solver/default.nix
index 0d5f2eab97868..1950403e10c68 100644
--- a/pkgs/games/black-hole-solver/default.nix
+++ b/pkgs/games/black-hole-solver/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A solver for Solitaire variants Golf, Black Hole, and All in a Row";
+    mainProgram = "black-hole-solve";
     homepage = "https://www.shlomifish.org/open-source/projects/black-hole-solitaire-solver/";
     license = licenses.mit;
   };
diff --git a/pkgs/games/blightmud/default.nix b/pkgs/games/blightmud/default.nix
index 3267c36a370ea..e62ab24370825 100644
--- a/pkgs/games/blightmud/default.nix
+++ b/pkgs/games/blightmud/default.nix
@@ -51,6 +51,7 @@ rustPlatform.buildRustPackage rec {
 
   meta = with lib; {
     description = "A terminal MUD client written in Rust";
+    mainProgram = "blightmud";
     longDescription = ''
       Blightmud is a terminal client for connecting to Multi User Dungeon (MUD)
       games. It is written in Rust and supports TLS, GMCP, MSDP, MCCP2, tab
diff --git a/pkgs/games/blobwars/default.nix b/pkgs/games/blobwars/default.nix
index dd94fc1096966..6c01e8d5a6044 100644
--- a/pkgs/games/blobwars/default.nix
+++ b/pkgs/games/blobwars/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Platform action game featuring a blob with lots of weapons";
+    mainProgram = "blobwars";
     homepage = "https://www.parallelrealities.co.uk/games/metalBlobSolid/";
     license = with licenses; [ gpl2Plus free ];
     maintainers = with maintainers; [ iblech ];
diff --git a/pkgs/games/blockattack/default.nix b/pkgs/games/blockattack/default.nix
index 6deba7987adaa..d59b93ae600c6 100644
--- a/pkgs/games/blockattack/default.nix
+++ b/pkgs/games/blockattack/default.nix
@@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://blockattack.net/";
     description = "An open source clone of Panel de Pon (aka Tetris Attack)";
+    mainProgram = "blockattack";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ AndersonTorres ];
     platforms = platforms.unix;
diff --git a/pkgs/games/boohu/default.nix b/pkgs/games/boohu/default.nix
index 708d8d7510bcb..6d90106521ad7 100644
--- a/pkgs/games/boohu/default.nix
+++ b/pkgs/games/boohu/default.nix
@@ -15,6 +15,7 @@ buildGoModule rec {
 
   meta = with lib; {
     description = "A new coffee-break roguelike game";
+    mainProgram = "boohu";
     longDescription = ''
       Break Out Of Hareka's Underground (Boohu) is a roguelike game mainly
       inspired from DCSS and its tavern, with some ideas from Brogue, but
diff --git a/pkgs/games/braincurses/default.nix b/pkgs/games/braincurses/default.nix
index f3f862b97ef9f..bbbc35b412a25 100644
--- a/pkgs/games/braincurses/default.nix
+++ b/pkgs/games/braincurses/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/bderrly/braincurses";
     description = "A version of the classic game Mastermind";
+    mainProgram = "braincurses";
     license = licenses.gpl2;
     maintainers = with maintainers; [ dotlambda ];
     platforms = platforms.linux;
diff --git a/pkgs/games/brogue-ce/default.nix b/pkgs/games/brogue-ce/default.nix
index 32ca328492bcd..1f454b53b6f1d 100644
--- a/pkgs/games/brogue-ce/default.nix
+++ b/pkgs/games/brogue-ce/default.nix
@@ -55,6 +55,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A community-lead fork of the minimalist roguelike game Brogue";
+    mainProgram = "brogue-ce";
     homepage = "https://github.com/tmewett/BrogueCE";
     license = licenses.agpl3;
     maintainers = with maintainers; [ AndersonTorres fgaz ];
diff --git a/pkgs/games/brogue/default.nix b/pkgs/games/brogue/default.nix
index 770ff36229231..326a04c8c8405 100644
--- a/pkgs/games/brogue/default.nix
+++ b/pkgs/games/brogue/default.nix
@@ -51,6 +51,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A roguelike game";
+    mainProgram = "brogue";
     homepage = "https://sites.google.com/site/broguegame/";
     license = licenses.agpl3;
     maintainers =  with maintainers; [ AndersonTorres fgaz ];
diff --git a/pkgs/games/brutalmaze/default.nix b/pkgs/games/brutalmaze/default.nix
index 8f8930ce0c630..124134eafc142 100644
--- a/pkgs/games/brutalmaze/default.nix
+++ b/pkgs/games/brutalmaze/default.nix
@@ -27,6 +27,7 @@ python3Packages.buildPythonApplication rec {
 
   meta = with lib; {
     description = "Minimalist thrilling shoot 'em up game";
+    mainProgram = "brutalmaze";
     homepage = "https://brutalmaze.rtfd.io";
     license = licenses.agpl3Plus;
     maintainers = [ maintainers.McSinyx ];
diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix
index fb54efee1dd5a..b2aa2878080b4 100644
--- a/pkgs/games/cataclysm-dda/common.nix
+++ b/pkgs/games/cataclysm-dda/common.nix
@@ -72,6 +72,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A free, post apocalyptic, zombie infested rogue-like";
+    mainProgram = "cataclysm-tiles";
     longDescription = ''
       Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world.
       Surviving is difficult: you have been thrown, ill-equipped, into a
diff --git a/pkgs/games/cbonsai/default.nix b/pkgs/games/cbonsai/default.nix
index 2dc131aba6db8..3898a42e476f0 100644
--- a/pkgs/games/cbonsai/default.nix
+++ b/pkgs/games/cbonsai/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Grow bonsai trees in your terminal";
+    mainProgram = "cbonsai";
     homepage = "https://gitlab.com/jallbrit/cbonsai";
     license = with licenses; [ gpl3Only ];
     maintainers = with maintainers; [ manveru ];
diff --git a/pkgs/games/cgoban/default.nix b/pkgs/games/cgoban/default.nix
index 3d202985f1b01..ce0cd1e5ffccd 100644
--- a/pkgs/games/cgoban/default.nix
+++ b/pkgs/games/cgoban/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Client for the KGS Go Server";
+    mainProgram = "cgoban";
     homepage = "https://www.gokgs.com/";
     sourceProvenance = with sourceTypes; [ binaryBytecode ];
     license = licenses.free;
diff --git a/pkgs/games/chromium-bsu/default.nix b/pkgs/games/chromium-bsu/default.nix
index 1ab2fb8722b0c..cd403c704e582 100644
--- a/pkgs/games/chromium-bsu/default.nix
+++ b/pkgs/games/chromium-bsu/default.nix
@@ -60,6 +60,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://chromium-bsu.sourceforge.net/";
     description = "A fast paced, arcade-style, top-scrolling space shooter";
+    mainProgram = "chromium-bsu";
     license = licenses.artistic1;
     maintainers = with maintainers; [ AndersonTorres ];
     platforms = platforms.unix;
diff --git a/pkgs/games/ckan/default.nix b/pkgs/games/ckan/default.nix
index c19b1e20812de..ed025ecee5d6c 100644
--- a/pkgs/games/ckan/default.nix
+++ b/pkgs/games/ckan/default.nix
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Mod manager for Kerbal Space Program";
+    mainProgram = "ckan";
     homepage = "https://github.com/KSP-CKAN/CKAN";
     license = licenses.mit;
     maintainers = with maintainers; [ Baughn ymarkus ];
diff --git a/pkgs/games/construo/default.nix b/pkgs/games/construo/default.nix
index 2565d8599a532..4c9419a54c659 100644
--- a/pkgs/games/construo/default.nix
+++ b/pkgs/games/construo/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Masses and springs simulation game";
+    mainProgram = "construo.x11";
     homepage = "http://fs.fsf.org/construo/";
     license = lib.licenses.gpl3;
   };
diff --git a/pkgs/games/corsix-th/default.nix b/pkgs/games/corsix-th/default.nix
index fed831146385b..04cfd263c9ee9 100644
--- a/pkgs/games/corsix-th/default.nix
+++ b/pkgs/games/corsix-th/default.nix
@@ -36,6 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A reimplementation of the 1997 Bullfrog business sim Theme Hospital";
+    mainProgram = "corsix-th";
     homepage = "https://corsixth.com/";
     license = licenses.mit;
     maintainers = with maintainers; [ hughobrien ];
diff --git a/pkgs/games/crack-attack/default.nix b/pkgs/games/crack-attack/default.nix
index 69395e1c44aab..71e15f562d459 100644
--- a/pkgs/games/crack-attack/default.nix
+++ b/pkgs/games/crack-attack/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A fast-paced puzzle game inspired by the classic Super NES title Tetris Attack!";
+    mainProgram = "crack-attack";
     homepage = "https://www.nongnu.org/crack-attack/";
     license = lib.licenses.gpl2;
     platforms = lib.platforms.linux;
diff --git a/pkgs/games/crossfire/crossfire-client.nix b/pkgs/games/crossfire/crossfire-client.nix
index 0d335b4f529a6..bc3a6bbf8b064 100644
--- a/pkgs/games/crossfire/crossfire-client.nix
+++ b/pkgs/games/crossfire/crossfire-client.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GTKv2 client for the Crossfire free MMORPG";
+    mainProgram = "crossfire-client-gtk2";
     homepage = "http://crossfire.real-time.com/";
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
diff --git a/pkgs/games/crrcsim/default.nix b/pkgs/games/crrcsim/default.nix
index 741f402870a89..447b1e75d6f73 100644
--- a/pkgs/games/crrcsim/default.nix
+++ b/pkgs/games/crrcsim/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A model-airplane flight simulator";
+    mainProgram = "crrcsim";
     maintainers = with lib.maintainers; [ raskin ];
     platforms = [ "i686-linux" "x86_64-linux" ];
     license = lib.licenses.gpl2;
diff --git a/pkgs/games/cutemaze/default.nix b/pkgs/games/cutemaze/default.nix
index bf3c0eae6385a..658511b02dad7 100644
--- a/pkgs/games/cutemaze/default.nix
+++ b/pkgs/games/cutemaze/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     changelog = "https://github.com/gottcode/cutemaze/blob/v${version}/ChangeLog";
     description = "Simple, top-down game in which mazes are randomly generated";
+    mainProgram = "cutemaze";
     homepage = "https://gottcode.org/cutemaze/";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ dotlambda ];
diff --git a/pkgs/games/cuyo/default.nix b/pkgs/games/cuyo/default.nix
index 871812e097a9d..6132b33a3b890 100644
--- a/pkgs/games/cuyo/default.nix
+++ b/pkgs/games/cuyo/default.nix
@@ -14,6 +14,7 @@ stdenv.mkDerivation {
   meta = {
      homepage = "http://karimmi.de/cuyo";
      description = "Stacking blocks game, with different rules for each level";
+     mainProgram = "cuyo";
      license = lib.licenses.gpl2Plus;
     platforms = lib.platforms.linux;
   };
diff --git a/pkgs/games/devilutionx/default.nix b/pkgs/games/devilutionx/default.nix
index 94838596a1297..7f98cbccff3ac 100644
--- a/pkgs/games/devilutionx/default.nix
+++ b/pkgs/games/devilutionx/default.nix
@@ -121,6 +121,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/diasurgical/devilutionX";
     description = "Diablo build for modern operating systems";
+    mainProgram = "devilutionx";
     longDescription = "In order to play this game a copy of diabdat.mpq is required. Place a copy of diabdat.mpq in ~/.local/share/diasurgical/devilution before executing the game.";
     license = licenses.unlicense;
     maintainers = with maintainers; [ karolchmist aanderse ];
diff --git a/pkgs/games/doom-ports/dhewm3/default.nix b/pkgs/games/doom-ports/dhewm3/default.nix
index 20e9f986f0c94..7740d00b5fb22 100644
--- a/pkgs/games/doom-ports/dhewm3/default.nix
+++ b/pkgs/games/doom-ports/dhewm3/default.nix
@@ -38,6 +38,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/dhewm/dhewm3";
     description = "Doom 3 port to SDL";
+    mainProgram = "dhewm3";
     license = lib.licenses.gpl3;
     maintainers = with maintainers; [ MP2E ];
     platforms = with platforms; linux;
diff --git a/pkgs/games/doom-ports/doomretro/default.nix b/pkgs/games/doom-ports/doomretro/default.nix
index f2bfd656ff2c4..127220603bdff 100644
--- a/pkgs/games/doom-ports/doomretro/default.nix
+++ b/pkgs/games/doom-ports/doomretro/default.nix
@@ -36,6 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = {
     homepage = "https://www.doomretro.com/";
     description = "A classic, refined DOOM source port";
+    mainProgram = "doomretro";
     longDescription = ''
       DOOM Retro is the classic, refined DOOM source port for Windows PC. It
       represents how I like my DOOM to be today, in all its dark and gritty,
diff --git a/pkgs/games/doom-ports/doomrunner/default.nix b/pkgs/games/doom-ports/doomrunner/default.nix
index 3c1e574ca5b1d..72b6ad15517d6 100644
--- a/pkgs/games/doom-ports/doomrunner/default.nix
+++ b/pkgs/games/doom-ports/doomrunner/default.nix
@@ -51,6 +51,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "Graphical launcher of ZDoom and derivatives";
+    mainProgram = "DoomRunner";
     homepage = "https://github.com/Youda008/DoomRunner/";
     changelog = "https://github.com/Youda008/DoomRunner/blob/${finalAttrs.src.rev}/changelog.txt";
     license = licenses.gpl3Only;
diff --git a/pkgs/games/doom-ports/doomseeker/default.nix b/pkgs/games/doom-ports/doomseeker/default.nix
index 48ea1a0296cfd..fb8fb1308491f 100644
--- a/pkgs/games/doom-ports/doomseeker/default.nix
+++ b/pkgs/games/doom-ports/doomseeker/default.nix
@@ -21,6 +21,7 @@ mkDerivation {
   meta = with lib; {
     homepage = "http://doomseeker.drdteam.org/";
     description = "Multiplayer server browser for many Doom source ports";
+    mainProgram = "doomseeker";
     license = licenses.gpl2;
     platforms = platforms.unix;
     maintainers = [ maintainers.MP2E ];
diff --git a/pkgs/games/doom-ports/enyo-launcher/default.nix b/pkgs/games/doom-ports/enyo-launcher/default.nix
index 8bc782bb36a86..857e2a543e63d 100644
--- a/pkgs/games/doom-ports/enyo-launcher/default.nix
+++ b/pkgs/games/doom-ports/enyo-launcher/default.nix
@@ -18,6 +18,7 @@ mkDerivation rec {
   meta = {
     homepage = "https://gitlab.com/sdcofer70/enyo-launcher";
     description = "Frontend for Doom engines";
+    mainProgram = "enyo-launcher";
     license = lib.licenses.gpl3Plus;
     platforms = lib.platforms.unix;
     maintainers = [ lib.maintainers.usrfriendly ];
diff --git a/pkgs/games/doom-ports/eternity-engine/default.nix b/pkgs/games/doom-ports/eternity-engine/default.nix
index cdff7fab1e127..7afef923e08b9 100644
--- a/pkgs/games/doom-ports/eternity-engine/default.nix
+++ b/pkgs/games/doom-ports/eternity-engine/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://doomworld.com/eternity";
     description = "New school Doom port by James Haley";
+    mainProgram = "eternity";
     license = lib.licenses.gpl3;
     platforms = lib.platforms.linux;
     maintainers = with lib.maintainers; [ MP2E ];
diff --git a/pkgs/games/doom-ports/eureka-editor/default.nix b/pkgs/games/doom-ports/eureka-editor/default.nix
index 6beae458d2930..2d547f959048b 100644
--- a/pkgs/games/doom-ports/eureka-editor/default.nix
+++ b/pkgs/games/doom-ports/eureka-editor/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://eureka-editor.sourceforge.net";
     description = "A map editor for the classic DOOM games, and a few related games such as Heretic and Hexen";
+    mainProgram = "eureka";
     license = licenses.gpl2Plus;
     platforms = platforms.all;
     badPlatforms = platforms.darwin;
diff --git a/pkgs/games/doom-ports/gzdoom/default.nix b/pkgs/games/doom-ports/gzdoom/default.nix
index 768a4936d821f..d063393210c4c 100644
--- a/pkgs/games/doom-ports/gzdoom/default.nix
+++ b/pkgs/games/doom-ports/gzdoom/default.nix
@@ -103,6 +103,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/ZDoom/gzdoom";
     description = "Modder-friendly OpenGL and Vulkan source port based on the DOOM engine";
+    mainProgram = "gzdoom";
     longDescription = ''
       GZDoom is a feature centric port for all DOOM engine games, based on
       ZDoom, adding an OpenGL renderer and powerful scripting capabilities.
diff --git a/pkgs/games/doom-ports/rbdoom-3-bfg/default.nix b/pkgs/games/doom-ports/rbdoom-3-bfg/default.nix
index 7ec57b7151380..07f809662d6bb 100644
--- a/pkgs/games/doom-ports/rbdoom-3-bfg/default.nix
+++ b/pkgs/games/doom-ports/rbdoom-3-bfg/default.nix
@@ -81,6 +81,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/RobertBeckebans/RBDOOM-3-BFG";
     description = "Doom 3 BFG Edition with modern engine features";
+    mainProgram = "RBDoom3BFG";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ Zaechus ];
     platforms = platforms.unix;
diff --git a/pkgs/games/doom-ports/zandronum/default.nix b/pkgs/games/doom-ports/zandronum/default.nix
index 0006ea3c7ce54..c8e1927aafed6 100644
--- a/pkgs/games/doom-ports/zandronum/default.nix
+++ b/pkgs/games/doom-ports/zandronum/default.nix
@@ -96,6 +96,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://zandronum.com/";
     description = "Multiplayer oriented port, based off Skulltag, for Doom and Doom II by id Software";
+    mainProgram = "zandronum-server";
     maintainers = with maintainers; [ lassulus MP2E ];
     license = licenses.sleepycat;
     platforms = platforms.linux;
diff --git a/pkgs/games/doom-ports/zdoom/bcc-git.nix b/pkgs/games/doom-ports/zdoom/bcc-git.nix
index aa3fdeca183a4..5263ef9bac32d 100644
--- a/pkgs/games/doom-ports/zdoom/bcc-git.nix
+++ b/pkgs/games/doom-ports/zdoom/bcc-git.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Compiler for Doom/Hexen scripts (ACS, BCS)";
+    mainProgram = "bcc";
     homepage = "https://github.com/wormt/bcc";
     license = licenses.mit;
     maintainers = with maintainers; [ertes];
diff --git a/pkgs/games/doom-ports/zdoom/zdbsp.nix b/pkgs/games/doom-ports/zdoom/zdbsp.nix
index d18eb144292fd..8949febdefea3 100644
--- a/pkgs/games/doom-ports/zdoom/zdbsp.nix
+++ b/pkgs/games/doom-ports/zdoom/zdbsp.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://zdoom.org/wiki/ZDBSP";
     description = "ZDoom's internal node builder for DOOM maps";
+    mainProgram = "zdbsp";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ lassulus siraben ];
     platforms = platforms.unix;
diff --git a/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix b/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix
index 42dd74a766b2f..55de9ffdf45e4 100644
--- a/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix
+++ b/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Tool to manage dwarves in a running game of Dwarf Fortress";
+    mainProgram = "dwarftherapist";
     maintainers = with maintainers; [ abbradar bendlas numinit jonringer ];
     license = licenses.mit;
     platforms = platforms.x86;
diff --git a/pkgs/games/ecwolf/default.nix b/pkgs/games/ecwolf/default.nix
index 542b414d8a45a..08b24deee0d47 100644
--- a/pkgs/games/ecwolf/default.nix
+++ b/pkgs/games/ecwolf/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Enhanched SDL-based port of Wolfenstein 3D for various platforms";
+    mainProgram = "ecwolf";
     homepage = "https://maniacsvault.net/ecwolf/";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ jayman2000 sander ];
diff --git a/pkgs/games/eidolon/default.nix b/pkgs/games/eidolon/default.nix
index 34bfd4151894f..fbb5d86deb914 100644
--- a/pkgs/games/eidolon/default.nix
+++ b/pkgs/games/eidolon/default.nix
@@ -30,6 +30,7 @@ rustPlatform.buildRustPackage rec {
 
   meta = with lib; {
     description = "A single TUI-based registry for drm-free, wine and steam games on linux, accessed through a rofi launch menu";
+    mainProgram = "eidolon";
     homepage = "https://github.com/nicohman/eidolon";
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ _0x4A6F ];
diff --git a/pkgs/games/empty-epsilon/default.nix b/pkgs/games/empty-epsilon/default.nix
index ba41431eb5ca3..20f4f5855a35a 100644
--- a/pkgs/games/empty-epsilon/default.nix
+++ b/pkgs/games/empty-epsilon/default.nix
@@ -77,6 +77,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Open source bridge simulator based on Artemis";
+    mainProgram = "EmptyEpsilon";
     homepage = "https://daid.github.io/EmptyEpsilon/";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ fpletz lheckemann ma27 ];
diff --git a/pkgs/games/endless-sky/default.nix b/pkgs/games/endless-sky/default.nix
index ffb71f393ca2e..7648bbd9b7716 100644
--- a/pkgs/games/endless-sky/default.nix
+++ b/pkgs/games/endless-sky/default.nix
@@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A sandbox-style space exploration game similar to Elite, Escape Velocity, or Star Control";
+    mainProgram = "endless-sky";
     homepage = "https://endless-sky.github.io/";
     license = with licenses; [
       gpl3Plus
diff --git a/pkgs/games/enigma/default.nix b/pkgs/games/enigma/default.nix
index e2e9ca1338c20..8deac27e579f4 100644
--- a/pkgs/games/enigma/default.nix
+++ b/pkgs/games/enigma/default.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Puzzle game inspired by Oxyd on the Atari ST and Rock'n'Roll on the Amiga";
+    mainProgram = "enigma";
     license = with licenses; [ gpl2 free ]; # source + bundles libs + art
     platforms = platforms.unix;
     broken = stdenv.hostPlatform.isDarwin;
diff --git a/pkgs/games/ezquake/default.nix b/pkgs/games/ezquake/default.nix
index a562b9353ebe3..46efa6c7b9827 100644
--- a/pkgs/games/ezquake/default.nix
+++ b/pkgs/games/ezquake/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://ezquake.com/";
     description = "A modern QuakeWorld client focused on competitive online play";
+    mainProgram = "ezquake";
     license = licenses.gpl2;
     platforms = platforms.linux;
     maintainers = with maintainers; [ edwtjo ];
diff --git a/pkgs/games/fairymax/default.nix b/pkgs/games/fairymax/default.nix
index b493f4dcfa27f..79468b320811e 100644
--- a/pkgs/games/fairymax/default.nix
+++ b/pkgs/games/fairymax/default.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://home.hccnet.nl/h.g.muller/dwnldpage.html";
     description = "A small chess engine supporting fairy pieces";
+    mainProgram = "fairymax";
     longDescription = ''
        A version of micro-Max that reads the piece description from a file
        fmax.ini, so that arbitrary fairy pieces can be implemented. This version
diff --git a/pkgs/games/ferium/default.nix b/pkgs/games/ferium/default.nix
index 903dd70222f6a..2f98970c70650 100644
--- a/pkgs/games/ferium/default.nix
+++ b/pkgs/games/ferium/default.nix
@@ -32,6 +32,7 @@ rustPlatform.buildRustPackage rec {
 
   meta = with lib; {
     description = "Fast and multi-source CLI program for managing Minecraft mods and modpacks from Modrinth, CurseForge, and GitHub Releases";
+    mainProgram = "ferium";
     homepage = "https://github.com/gorilla-devs/ferium";
     license = licenses.mpl20;
     maintainers = with maintainers; [ leo60228 soupglasses ];
diff --git a/pkgs/games/fheroes2/default.nix b/pkgs/games/fheroes2/default.nix
index a2e6943a00d39..fa6c4b4d8a238 100644
--- a/pkgs/games/fheroes2/default.nix
+++ b/pkgs/games/fheroes2/default.nix
@@ -59,6 +59,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/ihhub/fheroes2";
     description = "Free implementation of Heroes of Might and Magic II game engine";
+    mainProgram = "fheroes2";
     longDescription = ''
         In order to play this game, an original game data is required.
         Please refer to README of the project for instructions.
diff --git a/pkgs/games/fish-fillets-ng/default.nix b/pkgs/games/fish-fillets-ng/default.nix
index 787795828f4ff..3b83f732df747 100644
--- a/pkgs/games/fish-fillets-ng/default.nix
+++ b/pkgs/games/fish-fillets-ng/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A puzzle game";
+    mainProgram = "fillets";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ raskin ];
     platforms = platforms.linux;
diff --git a/pkgs/games/flare/default.nix b/pkgs/games/flare/default.nix
index 45e1ee765426b..0e1b4571e5ce9 100644
--- a/pkgs/games/flare/default.nix
+++ b/pkgs/games/flare/default.nix
@@ -16,6 +16,7 @@ buildEnv {
 
   meta = with lib; {
     description = "Fantasy action RPG using the FLARE engine";
+    mainProgram = "flare";
     homepage = "https://flarerpg.org/";
     maintainers = with maintainers; [ aanderse McSinyx ];
     license = [ licenses.gpl3 licenses.cc-by-sa-30 ];
diff --git a/pkgs/games/freedroid/default.nix b/pkgs/games/freedroid/default.nix
index 38eb60e7e0454..ab7c36ba5d5a3 100644
--- a/pkgs/games/freedroid/default.nix
+++ b/pkgs/games/freedroid/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A clone of the classic game 'Paradroid' on Commodore 64";
+    mainProgram = "freedroid";
     homepage    = "https://github.com/ReinhardPrix/FreedroidClassic";
     license     = licenses.gpl2Only;
     maintainers = with maintainers; [ iblech ];
diff --git a/pkgs/games/freedroidrpg/default.nix b/pkgs/games/freedroidrpg/default.nix
index 254d9b2ce6a64..1f31c20c7e489 100644
--- a/pkgs/games/freedroidrpg/default.nix
+++ b/pkgs/games/freedroidrpg/default.nix
@@ -31,6 +31,7 @@ in stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Isometric 3D RPG similar to game Diablo";
+    mainProgram = "freedroidRPG";
 
     longDescription = ''
       <para>
diff --git a/pkgs/games/freesweep/default.nix b/pkgs/games/freesweep/default.nix
index feba049a5cf0a..8add760f930b7 100644
--- a/pkgs/games/freesweep/default.nix
+++ b/pkgs/games/freesweep/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A console minesweeper-style game written in C for Unix-like systems";
+    mainProgram = "freesweep";
     homepage = "https://github.com/rwestlund/freesweep";
     license = licenses.gpl2;
     maintainers = with maintainers; [ kierdavis ];
diff --git a/pkgs/games/frotz/default.nix b/pkgs/games/frotz/default.nix
index 9bc7ae5ae512a..af9efd96318f3 100644
--- a/pkgs/games/frotz/default.nix
+++ b/pkgs/games/frotz/default.nix
@@ -41,6 +41,7 @@ stdenv.mkDerivation rec {
     homepage = "https://davidgriffith.gitlab.io/frotz/";
     changelog = "https://gitlab.com/DavidGriffith/frotz/-/raw/${version}/NEWS";
     description = "A z-machine interpreter for Infocom games and other interactive fiction";
+    mainProgram = "frotz";
     platforms = platforms.unix;
     maintainers = with maintainers; [ nicknovitski ddelabru ];
     license = licenses.gpl2;
diff --git a/pkgs/games/fsg/default.nix b/pkgs/games/fsg/default.nix
index 282030023f74f..d5680669df9e9 100644
--- a/pkgs/games/fsg/default.nix
+++ b/pkgs/games/fsg/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Cellular automata engine tuned towards the likes of Falling Sand";
+    mainProgram = "fsg";
     maintainers = [ lib.maintainers.raskin ];
     platforms = lib.platforms.linux;
   };
diff --git a/pkgs/games/gambit/default.nix b/pkgs/games/gambit/default.nix
index 4bcd329171cc8..90e23e9820c68 100644
--- a/pkgs/games/gambit/default.nix
+++ b/pkgs/games/gambit/default.nix
@@ -46,6 +46,7 @@ buildGoModule rec {
 
   meta = with lib; {
     description = "Play chess in your terminal";
+    mainProgram = "gambit";
     homepage = "https://github.com/maaslalani/gambit";
     changelog = "https://github.com/maaslalani/gambit/releases/tag/${src.rev}";
     license = licenses.mit;
diff --git a/pkgs/games/garden-of-coloured-lights/default.nix b/pkgs/games/garden-of-coloured-lights/default.nix
index 7012449f6afca..27b0255eba09f 100644
--- a/pkgs/games/garden-of-coloured-lights/default.nix
+++ b/pkgs/games/garden-of-coloured-lights/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Old-school vertical shoot-em-up / bullet hell";
+    mainProgram = "garden";
     homepage = "https://garden.sourceforge.net/drupal/";
     maintainers = with maintainers; [ ];
     license = licenses.gpl3;
diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix
index 9be95457b41c8..35b8dc7330312 100644
--- a/pkgs/games/gargoyle/default.nix
+++ b/pkgs/games/gargoyle/default.nix
@@ -69,6 +69,7 @@ stdenv.mkDerivation rec {
     homepage = "http://ccxvii.net/gargoyle/";
     license = licenses.gpl2Plus;
     description = "Interactive fiction interpreter GUI";
+    mainProgram = "gargoyle";
     platforms = platforms.unix;
     maintainers = with maintainers; [ orivej ];
   };
diff --git a/pkgs/games/gav/default.nix b/pkgs/games/gav/default.nix
index dc2868ba21b5f..23f1fe7854b45 100644
--- a/pkgs/games/gav/default.nix
+++ b/pkgs/games/gav/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Remake of AV Arcade Volleyball";
+    mainProgram = "gav";
     homepage = "https://gav.sourceforge.net/";
     license = lib.licenses.gpl2Plus;
     platforms = lib.platforms.linux;
diff --git a/pkgs/games/gl-117/default.nix b/pkgs/games/gl-117/default.nix
index f135c93ff04fa..493ca986d9c24 100644
--- a/pkgs/games/gl-117/default.nix
+++ b/pkgs/games/gl-117/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An air combat simulator";
+    mainProgram = "gl-117";
     homepage = "https://sourceforge.net/projects/gl-117";
     maintainers = with maintainers; [ raskin ];
     license = licenses.gpl2;
diff --git a/pkgs/games/gl-gsync-demo/default.nix b/pkgs/games/gl-gsync-demo/default.nix
index 968d4d5e4a3da..2027b9d3b27ec 100644
--- a/pkgs/games/gl-gsync-demo/default.nix
+++ b/pkgs/games/gl-gsync-demo/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
     platforms = platforms.linux;
     maintainers = with maintainers; [ atemu ];
     description = "A very basic OpenGL demo for testing NVIDIA's G-SYNC technology on Linux";
+    mainProgram = "gl-gsync-demo";
     longDescription = ''
       The demo simply draws a vertical bar moving across the screen at constant speed, but deliberately rendered at a variable frame rate.
 
diff --git a/pkgs/games/globulation/default.nix b/pkgs/games/globulation/default.nix
index 039098f87da54..a444f18335fc4 100644
--- a/pkgs/games/globulation/default.nix
+++ b/pkgs/games/globulation/default.nix
@@ -61,6 +61,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "RTS without micromanagement";
+    mainProgram = "glob2";
     maintainers = with maintainers; [ raskin ];
     platforms = platforms.linux;
     license = licenses.gpl3;
diff --git a/pkgs/games/gltron/default.nix b/pkgs/games/gltron/default.nix
index 540170c49b215..cbc8510775b96 100644
--- a/pkgs/games/gltron/default.nix
+++ b/pkgs/games/gltron/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://www.gltron.org/";
     description = "Game based on the movie Tron";
+    mainProgram = "gltron";
     license = lib.licenses.gpl2Plus;
     maintainers = with lib.maintainers; [viric];
     platforms = with lib.platforms; linux;
diff --git a/pkgs/games/gnome-hexgl/default.nix b/pkgs/games/gnome-hexgl/default.nix
index 54d74ffa5fa03..1c7627582d61f 100644
--- a/pkgs/games/gnome-hexgl/default.nix
+++ b/pkgs/games/gnome-hexgl/default.nix
@@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Gthree port of HexGL";
+    mainProgram = "gnome-hexgl";
     homepage = "https://github.com/alexlarsson/gnome-hexgl";
     license = licenses.mit;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/games/gnonograms/default.nix b/pkgs/games/gnonograms/default.nix
index c021ca46f57a5..69d45e32fe26c 100644
--- a/pkgs/games/gnonograms/default.nix
+++ b/pkgs/games/gnonograms/default.nix
@@ -52,6 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "Nonograms puzzle game";
+    mainProgram = "com.github.jeremypw.gnonograms";
     longDescription = ''
       An implementation of the Japanese logic puzzle "Nonograms" written in
       Vala, allowing the user to:
diff --git a/pkgs/games/gnugo/default.nix b/pkgs/games/gnugo/default.nix
index 3b8449ab4c7f5..82848ab008052 100644
--- a/pkgs/games/gnugo/default.nix
+++ b/pkgs/games/gnugo/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "GNU Go - A computer go player";
+    mainProgram = "gnugo";
     homepage = "https://www.gnu.org/software/gnugo/";
     license = lib.licenses.gpl3;
     platforms = lib.platforms.unix;
diff --git a/pkgs/games/gnujump/default.nix b/pkgs/games/gnujump/default.nix
index 0fdffcf6fadb5..10750f84da680 100644
--- a/pkgs/games/gnujump/default.nix
+++ b/pkgs/games/gnujump/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "https://jump.gnu.sinusoid.es/index.php?title=Main_Page";
     description = "A clone of the simple yet addictive game Xjump";
+    mainProgram = "gnujump";
     longDescription = ''
       The goal in this game is to jump to the next floor trying not to fall
       down. As you go upper in the Falling Tower the floors will fall faster.
diff --git a/pkgs/games/gnushogi/default.nix b/pkgs/games/gnushogi/default.nix
index 2557b0571ea9c..38f76de1e7a0e 100644
--- a/pkgs/games/gnushogi/default.nix
+++ b/pkgs/games/gnushogi/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GNU implementation of Shogi, also known as Japanese Chess";
+    mainProgram = "gnushogi";
     homepage = "https://www.gnu.org/software/gnushogi/";
     license = licenses.gpl3;
     maintainers = [ maintainers.ciil ];
diff --git a/pkgs/games/gogdl/default.nix b/pkgs/games/gogdl/default.nix
index 83bf90147b5f0..91cfe972d9c6e 100644
--- a/pkgs/games/gogdl/default.nix
+++ b/pkgs/games/gogdl/default.nix
@@ -32,6 +32,7 @@ buildPythonApplication rec {
 
   meta = with lib; {
     description = "GOG Downloading module for Heroic Games Launcher";
+    mainProgram = "gogdl";
     homepage = "https://github.com/Heroic-Games-Launcher/heroic-gogdl";
     license = with licenses; [ gpl3 ];
     maintainers = with maintainers; [ aidalgol ];
diff --git a/pkgs/games/gotypist/default.nix b/pkgs/games/gotypist/default.nix
index 24afb9317c5b4..12489a27e6a6a 100644
--- a/pkgs/games/gotypist/default.nix
+++ b/pkgs/games/gotypist/default.nix
@@ -15,6 +15,7 @@ buildGoModule rec {
 
   meta = with lib; {
     description = "A touch-typing tutor";
+    mainProgram = "gotypist";
     longDescription = ''
       A simple touch-typing tutor that follows Steve Yegge's methodology of
       going in fast, slow, and medium cycles.
diff --git a/pkgs/games/gshogi/default.nix b/pkgs/games/gshogi/default.nix
index 77eab7918b91c..350ab86aa22b3 100644
--- a/pkgs/games/gshogi/default.nix
+++ b/pkgs/games/gshogi/default.nix
@@ -33,6 +33,7 @@ python3.pkgs.buildPythonApplication rec {
   meta = with lib; {
     homepage = "http://johncheetham.com/projects/gshogi/";
     description = "A graphical implementation of the Shogi board game, also known as Japanese Chess";
+    mainProgram = "gshogi";
     license = licenses.gpl3Plus;
     platforms = platforms.linux;
     maintainers = [ maintainers.ciil ];
diff --git a/pkgs/games/gtetrinet/default.nix b/pkgs/games/gtetrinet/default.nix
index af16d5e9f7482..58ac8b2d77cc4 100644
--- a/pkgs/games/gtetrinet/default.nix
+++ b/pkgs/games/gtetrinet/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation {
 
   meta = {
     description = "Client for Tetrinet, a multiplayer online Tetris game";
+    mainProgram = "gtetrinet";
     longDescription = ''
       GTetrinet is a client program for Tetrinet, a multiplayer tetris game
       that is played over the internet.
diff --git a/pkgs/games/gweled/default.nix b/pkgs/games/gweled/default.nix
index fc187afbe8067..484543ad86592 100644
--- a/pkgs/games/gweled/default.nix
+++ b/pkgs/games/gweled/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Bejeweled clone game";
+    mainProgram = "gweled";
     homepage = "https://gweled.org";
     license = licenses.gpl2;
     platforms = platforms.linux;
diff --git a/pkgs/games/harmonist/default.nix b/pkgs/games/harmonist/default.nix
index cbb556cbc9480..57e9a06ec9a54 100644
--- a/pkgs/games/harmonist/default.nix
+++ b/pkgs/games/harmonist/default.nix
@@ -15,6 +15,7 @@ buildGoModule rec {
 
   meta = with lib; {
     description = "A stealth coffee-break roguelike game";
+    mainProgram = "harmonist";
     longDescription = ''
       Harmonist is a stealth coffee-break roguelike game. The game has a heavy
       focus on tactical positioning, light and noise mechanisms, making use of
diff --git a/pkgs/games/hase/default.nix b/pkgs/games/hase/default.nix
index f807572455afa..1e1ef23367fa0 100644
--- a/pkgs/games/hase/default.nix
+++ b/pkgs/games/hase/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation {
 
   meta = {
     description = "An open-source artillery shooter";
+    mainProgram = "hase";
     longDescription = ''
       Hase is an open source gravity based artillery shooter. It is similar to
       Worms, Hedgewars or artillery, but the gravity force and direction
diff --git a/pkgs/games/hex-a-hop/default.nix b/pkgs/games/hex-a-hop/default.nix
index c6eaed57a9ca1..32a395195b5ea 100644
--- a/pkgs/games/hex-a-hop/default.nix
+++ b/pkgs/games/hex-a-hop/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A puzzle game based on hexagonal tiles";
+    mainProgram = "hex-a-hop";
     homepage = "http://hexahop.sourceforge.net";
     license = with lib.licenses; [
       gpl2Plus # Main code
diff --git a/pkgs/games/hexgui/default.nix b/pkgs/games/hexgui/default.nix
index 49dae42175512..6fc66b8704390 100644
--- a/pkgs/games/hexgui/default.nix
+++ b/pkgs/games/hexgui/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation {
 
   meta = {
     description = "GUI for the board game Hex";
+    mainProgram = "hexgui";
     homepage = "https://github.com/selinger/hexgui";
     license = lib.licenses.gpl3;
     maintainers = [ lib.maintainers.ursi ];
diff --git a/pkgs/games/hmcl/default.nix b/pkgs/games/hmcl/default.nix
index fcaa01ea2d95f..95a40f0a8d809 100644
--- a/pkgs/games/hmcl/default.nix
+++ b/pkgs/games/hmcl/default.nix
@@ -89,6 +89,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "https://hmcl.huangyuhui.net";
     description = "A Minecraft Launcher which is multi-functional, cross-platform and popular";
+    mainProgram = "hmcl";
     sourceProvenance = with sourceTypes; [ binaryBytecode ];
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/games/hyperrogue/default.nix b/pkgs/games/hyperrogue/default.nix
index ddbe41df430e7..1177ad59413a1 100644
--- a/pkgs/games/hyperrogue/default.nix
+++ b/pkgs/games/hyperrogue/default.nix
@@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.roguetemple.com/z/hyper/";
     description = "A roguelike game set in hyperbolic geometry";
+    mainProgram = "hyperrogue";
     maintainers = with maintainers; [ rardiol ];
     license = licenses.gpl2;
     platforms = platforms.all;
diff --git a/pkgs/games/icbm3d/default.nix b/pkgs/games/icbm3d/default.nix
index a166b4f83f2b4..6f531f4242281 100644
--- a/pkgs/games/icbm3d/default.nix
+++ b/pkgs/games/icbm3d/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://www.newbreedsoftware.com/icbm3d/";
     description = "3D vector-based clone of the atari game Missile Command";
+    mainProgram = "icbm3d";
     license = lib.licenses.gpl2Plus;
     platforms = lib.platforms.linux;
   };
diff --git a/pkgs/games/infra-arcana/default.nix b/pkgs/games/infra-arcana/default.nix
index 6eb1f44aa8cc2..c5c960d7deff9 100644
--- a/pkgs/games/infra-arcana/default.nix
+++ b/pkgs/games/infra-arcana/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://sites.google.com/site/infraarcana";
     description = "A Lovecraftian single-player roguelike game";
+    mainProgram = "infra-arcana";
     longDescription = ''
       Infra Arcana is a Roguelike set in the early 20th century. The goal is to
       explore the lair of a dreaded cult called The Church of Starry Wisdom.
diff --git a/pkgs/games/instawow/default.nix b/pkgs/games/instawow/default.nix
index 7534f5f892a7c..d1ed292f377ca 100644
--- a/pkgs/games/instawow/default.nix
+++ b/pkgs/games/instawow/default.nix
@@ -42,6 +42,7 @@ python3.pkgs.buildPythonApplication rec {
   meta = with lib; {
     homepage = "https://github.com/layday/instawow";
     description = "World of Warcraft add-on manager CLI and GUI";
+    mainProgram = "instawow";
     license = licenses.gpl3;
     maintainers = with maintainers; [ seirl ];
   };
diff --git a/pkgs/games/julius/default.nix b/pkgs/games/julius/default.nix
index df1ff2bd1a065..9661113adea54 100644
--- a/pkgs/games/julius/default.nix
+++ b/pkgs/games/julius/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/bvschaik/julius";
     description = "An open source re-implementation of Caesar III";
+    mainProgram = "julius";
     license = licenses.agpl3;
     maintainers = with maintainers; [ Thra11 ];
     platforms = platforms.all;
diff --git a/pkgs/games/jumpy/default.nix b/pkgs/games/jumpy/default.nix
index d4f8a8fcbdbc9..29110d42ff825 100644
--- a/pkgs/games/jumpy/default.nix
+++ b/pkgs/games/jumpy/default.nix
@@ -77,6 +77,7 @@ rustPlatform.buildRustPackage rec {
 
   meta = with lib; {
     description = "A tactical 2D shooter played by up to 4 players online or on a shared screen";
+    mainProgram = "jumpy";
     homepage = "https://fishfight.org/";
     changelog = "https://github.com/fishfolk/jumpy/releases/tag/v${version}";
     license = with licenses; [ mit /* or */ asl20 ];
diff --git a/pkgs/games/kabeljau/default.nix b/pkgs/games/kabeljau/default.nix
index 0b5b1167ead35..b518121b63909 100644
--- a/pkgs/games/kabeljau/default.nix
+++ b/pkgs/games/kabeljau/default.nix
@@ -33,6 +33,7 @@ stdenvNoCC.mkDerivation rec {
 
   meta = with lib; {
     description = "Survive as a stray cat in an ncurses game";
+    mainProgram = "kabeljau";
     homepage = "https://codeberg.org/annaaurora/kabeljau";
     license = licenses.lgpl3Only;
     maintainers = with maintainers; [ annaaurora ];
diff --git a/pkgs/games/katago/default.nix b/pkgs/games/katago/default.nix
index 834ec0774d7ae..e9ba507a3c95d 100644
--- a/pkgs/games/katago/default.nix
+++ b/pkgs/games/katago/default.nix
@@ -98,6 +98,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Go engine modeled after AlphaGo Zero";
+    mainProgram = "katago";
     homepage    = "https://github.com/lightvector/katago";
     license     = licenses.mit;
     maintainers = [ maintainers.omnipotententity ];
diff --git a/pkgs/games/keeperrl/default.nix b/pkgs/games/keeperrl/default.nix
index c66ffdee920d4..0cbcfd036702f 100644
--- a/pkgs/games/keeperrl/default.nix
+++ b/pkgs/games/keeperrl/default.nix
@@ -82,6 +82,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A dungeon management rogue-like";
+    mainProgram = "keeper";
     homepage = "https://keeperrl.com/";
     license = licenses.gpl2;
     maintainers = with maintainers; [ onny ];
diff --git a/pkgs/games/klavaro/default.nix b/pkgs/games/klavaro/default.nix
index b99969bf6a814..58dda8d23a635 100644
--- a/pkgs/games/klavaro/default.nix
+++ b/pkgs/games/klavaro/default.nix
@@ -48,6 +48,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Free touch typing tutor program";
+    mainProgram = "klavaro";
     homepage = "http://klavaro.sourceforge.net/";
     changelog = "https://sourceforge.net/p/klavaro/code/HEAD/tree/trunk/ChangeLog";
     license = licenses.gpl3Plus;
diff --git a/pkgs/games/kobodeluxe/default.nix b/pkgs/games/kobodeluxe/default.nix
index 9dea908242045..9a2d16c14bff6 100644
--- a/pkgs/games/kobodeluxe/default.nix
+++ b/pkgs/games/kobodeluxe/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://olofson.net/kobodl/";
     description = "Enhanced version of Akira Higuchi's game XKobo  for Un*x systems with X11";
+    mainProgram = "kobodl";
     license = lib.licenses.gpl2Plus;
     platforms = lib.platforms.linux;
   };
diff --git a/pkgs/games/koboredux/default.nix b/pkgs/games/koboredux/default.nix
index 91981fc85fba0..46db8b1da57a4 100644
--- a/pkgs/games/koboredux/default.nix
+++ b/pkgs/games/koboredux/default.nix
@@ -75,6 +75,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A frantic 80's style 2D shooter, similar to XKobo and Kobo Deluxe" +
       optionalString (!useProprietaryAssets) " (built without proprietary assets)";
+    mainProgram = "kobord";
     longDescription = ''
       Kobo Redux is a frantic 80's style 2D shooter, inspired by the look and
       feel of 90's arcade cabinets. The gameplay is fast and unforgiving,
diff --git a/pkgs/games/koules/default.nix b/pkgs/games/koules/default.nix
index 360415dc2e1da..a59199e949c84 100644
--- a/pkgs/games/koules/default.nix
+++ b/pkgs/games/koules/default.nix
@@ -70,6 +70,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.ucw.cz/~hubicka/koules/English/";
     description = "Fast arcade game based on the fundamental law of body attraction";
+    mainProgram = "xkoules";
     license = licenses.gpl2Plus;
     maintainers = [ maintainers.iblech ];
     platforms = platforms.linux;
diff --git a/pkgs/games/lgogdownloader/default.nix b/pkgs/games/lgogdownloader/default.nix
index a28ccea53ca1f..a03a05bcb3569 100644
--- a/pkgs/games/lgogdownloader/default.nix
+++ b/pkgs/games/lgogdownloader/default.nix
@@ -58,6 +58,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Unofficial downloader to GOG.com for Linux users. It uses the same API as the official GOGDownloader";
+    mainProgram = "lgogdownloader";
     homepage = "https://github.com/Sude-/lgogdownloader";
     license = licenses.wtfpl;
     maintainers = with maintainers; [ _0x4A6F ];
diff --git a/pkgs/games/liberation-circuit/default.nix b/pkgs/games/liberation-circuit/default.nix
index 365fbb2983eb0..5333910820347 100644
--- a/pkgs/games/liberation-circuit/default.nix
+++ b/pkgs/games/liberation-circuit/default.nix
@@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Real-time strategy game with programmable units";
+    mainProgram = "liberation-circuit";
     longDescription = ''
       Escape from a hostile computer system! Harvest data to create an armada of battle-processes to aid your escape! Take command directly and play the game as an RTS, or use the game's built-in editor and compiler to write your own unit AI in a simplified version of C.
     '';
diff --git a/pkgs/games/libremines/default.nix b/pkgs/games/libremines/default.nix
index fddc2ba920010..9177e337593e1 100644
--- a/pkgs/games/libremines/default.nix
+++ b/pkgs/games/libremines/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Qt based Minesweeper game";
+    mainProgram = "libremines";
     longDescription = ''
       A Free/Libre and Open Source Software Qt based Minesweeper game available for GNU/Linux, FreeBSD and Windows systems.
     '';
diff --git a/pkgs/games/lincity/default.nix b/pkgs/games/lincity/default.nix
index 50b48f0a15821..e03dda491c4c5 100644
--- a/pkgs/games/lincity/default.nix
+++ b/pkgs/games/lincity/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "City simulation game";
+    mainProgram = "xlincity";
     license = licenses.gpl2Plus;
     homepage = "https://sourceforge.net/projects/lincity";
     maintainers = with maintainers; [ ];
diff --git a/pkgs/games/lincity/ng.nix b/pkgs/games/lincity/ng.nix
index 9901255be4dca..2bf4e9c6f8f87 100644
--- a/pkgs/games/lincity/ng.nix
+++ b/pkgs/games/lincity/ng.nix
@@ -77,6 +77,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "City building game";
+    mainProgram = "lincity-ng";
     license = licenses.gpl2;
     maintainers = with maintainers; [ raskin ];
     platforms = platforms.linux;
diff --git a/pkgs/games/linthesia/default.nix b/pkgs/games/linthesia/default.nix
index 0fd252e7ba5d2..1200afa4f2f71 100644
--- a/pkgs/games/linthesia/default.nix
+++ b/pkgs/games/linthesia/default.nix
@@ -47,6 +47,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A game of playing music using a MIDI keyboard following a MIDI file";
+    mainProgram = "linthesia";
     inherit (src.meta) homepage;
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
diff --git a/pkgs/games/lugaru/default.nix b/pkgs/games/lugaru/default.nix
index 9d10691fe49c6..b989195bd5a3b 100644
--- a/pkgs/games/lugaru/default.nix
+++ b/pkgs/games/lugaru/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Third person ninja rabbit fighting game";
+    mainProgram = "lugaru";
     homepage = "https://osslugaru.gitlab.io";
     maintainers = [ ];
     platforms = platforms.linux;
diff --git a/pkgs/games/lzwolf/default.nix b/pkgs/games/lzwolf/default.nix
index 3f1e37c258a3b..7e3e932ba5cf0 100644
--- a/pkgs/games/lzwolf/default.nix
+++ b/pkgs/games/lzwolf/default.nix
@@ -66,6 +66,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://bitbucket.org/linuxwolf6/lzwolf";
     description = "Enhanced fork of ECWolf, a Wolfenstein 3D source port";
+    mainProgram = "lzwolf";
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
     maintainers = with maintainers; [ tgunnoe ];
diff --git a/pkgs/games/macopix/default.nix b/pkgs/games/macopix/default.nix
index 277752dc91c3f..ca9870727b2ca 100644
--- a/pkgs/games/macopix/default.nix
+++ b/pkgs/games/macopix/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Mascot Constructive Pilot for X";
+    mainProgram = "macopix";
     homepage = "http://rosegray.sakura.ne.jp/macopix/index-e.html";
     license = lib.licenses.gpl2Plus;
     platforms = lib.platforms.linux;
diff --git a/pkgs/games/maelstrom/default.nix b/pkgs/games/maelstrom/default.nix
index 065784d605ef1..9c408b2643cfb 100644
--- a/pkgs/games/maelstrom/default.nix
+++ b/pkgs/games/maelstrom/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An arcade-style game resembling Asteroids";
+    mainProgram = "maelstrom";
     license = licenses.gpl2Plus;
     platforms = platforms.all;
     maintainers = with maintainers; [ tmountain ];
diff --git a/pkgs/games/maptool/default.nix b/pkgs/games/maptool/default.nix
index ed505b32eda3e..6eb9c76db487a 100644
--- a/pkgs/games/maptool/default.nix
+++ b/pkgs/games/maptool/default.nix
@@ -21,6 +21,7 @@ let
 
   meta = with lib; {
     description = "Virtual Tabletop for playing roleplaying games with remote players or face to face";
+    mainProgram = "maptool";
     homepage = "https://www.rptools.net/toolbox/maptool/";
     sourceProvenance = with sourceTypes; [
       binaryBytecode
diff --git a/pkgs/games/mar1d/default.nix b/pkgs/games/mar1d/default.nix
index 6b3fe5feb2de1..f8feb291a0e16 100644
--- a/pkgs/games/mar1d/default.nix
+++ b/pkgs/games/mar1d/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "First person Super Mario Bros";
+    mainProgram = "MAR1D";
     longDescription = ''
       The original Super Mario Bros as you've never seen it. Step into Mario's
       shoes in this first person clone of the classic Mario game. True to the
diff --git a/pkgs/games/marble-marcher-ce/default.nix b/pkgs/games/marble-marcher-ce/default.nix
index 8bf7da44cadcb..ee1422abc5b8e 100644
--- a/pkgs/games/marble-marcher-ce/default.nix
+++ b/pkgs/games/marble-marcher-ce/default.nix
@@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A community-developed version of the original Marble Marcher - a fractal physics game";
+    mainProgram = "marble-marcher-ce";
     homepage = "https://michaelmoroz.itch.io/mmce";
     license = with licenses; [
       gpl2Plus # Code
diff --git a/pkgs/games/mari0/default.nix b/pkgs/games/mari0/default.nix
index 6e644245c4fb5..f75fbedebd7da 100644
--- a/pkgs/games/mari0/default.nix
+++ b/pkgs/games/mari0/default.nix
@@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Crossover between Super Mario Bros. and Portal";
+    mainProgram = "mari0";
     platforms = platforms.linux;
     license = licenses.mit;
     downloadPage = "https://stabyourself.net/mari0/";
diff --git a/pkgs/games/methane/default.nix b/pkgs/games/methane/default.nix
index 071e1a64b5451..5ab8843b33bf1 100644
--- a/pkgs/games/methane/default.nix
+++ b/pkgs/games/methane/default.nix
@@ -63,6 +63,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/rombust/methane";
     description = "A clone of Taito's Bubble Bobble arcade game released for Amiga in 1993 by Apache Software";
+    mainProgram = "methane";
     license = licenses.gpl2Only;
     maintainers = with maintainers; [ nixinator ];
     platforms = [ "x86_64-linux" ];
diff --git a/pkgs/games/mnemosyne/default.nix b/pkgs/games/mnemosyne/default.nix
index 388aefe567b94..938e6aa53aca5 100644
--- a/pkgs/games/mnemosyne/default.nix
+++ b/pkgs/games/mnemosyne/default.nix
@@ -53,6 +53,7 @@ python.pkgs.buildPythonApplication rec {
   meta = {
     homepage = "https://mnemosyne-proj.org/";
     description = "Spaced-repetition software";
+    mainProgram = "mnemosyne";
     longDescription = ''
       The Mnemosyne Project has two aspects:
 
diff --git a/pkgs/games/moon-buggy/default.nix b/pkgs/games/moon-buggy/default.nix
index 87e089eb9571d..e0235e70a92d9 100644
--- a/pkgs/games/moon-buggy/default.nix
+++ b/pkgs/games/moon-buggy/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A simple character graphics game where you drive some kind of car across the moon's surface";
+    mainProgram = "moon-buggy";
     license = lib.licenses.gpl2;
     maintainers = [ lib.maintainers.rybern ];
     platforms = lib.platforms.linux ++ lib.platforms.darwin;
diff --git a/pkgs/games/mrrescue/default.nix b/pkgs/games/mrrescue/default.nix
index a020a6b34f1b4..17e24d3af1a39 100644
--- a/pkgs/games/mrrescue/default.nix
+++ b/pkgs/games/mrrescue/default.nix
@@ -49,6 +49,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Arcade-style fire fighting game";
+    mainProgram = "mrrescue";
     maintainers = with maintainers; [ ];
     platforms = platforms.linux;
     license = licenses.zlib;
diff --git a/pkgs/games/n2048/default.nix b/pkgs/games/n2048/default.nix
index ec3a4e2bbeecf..2ae937ee6be27 100644
--- a/pkgs/games/n2048/default.nix
+++ b/pkgs/games/n2048/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
   '';
   meta = with lib; {
     description = "Console implementation of 2048 game";
+    mainProgram = "n2048";
     license = licenses.bsd2;
     maintainers = with maintainers; [ raskin ];
     platforms = platforms.linux;
diff --git a/pkgs/games/naev/default.nix b/pkgs/games/naev/default.nix
index d6785ca4d8174..962497bb73c0b 100644
--- a/pkgs/games/naev/default.nix
+++ b/pkgs/games/naev/default.nix
@@ -75,6 +75,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "2D action/rpg space game";
+    mainProgram = "naev";
     homepage = "http://www.naev.org";
     license = lib.licenses.gpl3Plus;
     maintainers = with lib.maintainers; [ ralismark ];
diff --git a/pkgs/games/netris/default.nix b/pkgs/games/netris/default.nix
index ff898128ca06e..620f21f02902e 100644
--- a/pkgs/games/netris/default.nix
+++ b/pkgs/games/netris/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A free networked version of T*tris";
+    mainProgram = "netris";
     license = licenses.gpl2;
     maintainers = with maintainers; [ patryk27 ];
     platforms = platforms.linux;
diff --git a/pkgs/games/newtonwars/default.nix b/pkgs/games/newtonwars/default.nix
index 0be3d9bf7a0e2..5541d9ade7d19 100644
--- a/pkgs/games/newtonwars/default.nix
+++ b/pkgs/games/newtonwars/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A space battle game with gravity as the main theme";
+    mainProgram = "nw";
     maintainers = with maintainers; [ pSub ];
     platforms = platforms.linux;
     license = licenses.mit;
diff --git a/pkgs/games/nile/default.nix b/pkgs/games/nile/default.nix
index f1117f2fba890..b83eda87f934d 100644
--- a/pkgs/games/nile/default.nix
+++ b/pkgs/games/nile/default.nix
@@ -50,6 +50,7 @@ buildPythonApplication rec {
 
   meta = with lib; {
     description = "Unofficial Amazon Games client";
+    mainProgram = "nile";
     homepage = "https://github.com/imLinguin/nile";
     license = with licenses; [ gpl3 ];
     maintainers = with maintainers; [ aidalgol ];
diff --git a/pkgs/games/ninvaders/default.nix b/pkgs/games/ninvaders/default.nix
index c3f455b71b07f..5fe9eb81be615 100644
--- a/pkgs/games/ninvaders/default.nix
+++ b/pkgs/games/ninvaders/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Space Invaders clone based on ncurses";
+    mainProgram = "ninvaders";
     homepage = "https://ninvaders.sourceforge.net/";
     license = licenses.gpl2;
     maintainers = with maintainers; [ _1000101 ];
diff --git a/pkgs/games/njam/default.nix b/pkgs/games/njam/default.nix
index 971cd1d0726c8..8fce2a1ca8cda 100644
--- a/pkgs/games/njam/default.nix
+++ b/pkgs/games/njam/default.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://trackballs.sourceforge.net/";
     description = "Cross-platform pacman-like game";
+    mainProgram = "njam";
     license = lib.licenses.gpl2Plus;
     platforms = lib.platforms.linux;
   };
diff --git a/pkgs/games/npush/default.nix b/pkgs/games/npush/default.nix
index 7f4afb7b89f38..9fc465da38a81 100644
--- a/pkgs/games/npush/default.nix
+++ b/pkgs/games/npush/default.nix
@@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
     broken = stdenv.isDarwin;
     homepage = "https://npush.sourceforge.net/";
     description = "A Sokoban-like game";
+    mainProgram = "npush";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ AndersonTorres ];
     platforms = with platforms; unix;
diff --git a/pkgs/games/nsnake/default.nix b/pkgs/games/nsnake/default.nix
index aa3f568ec009b..a4ac391690ecd 100644
--- a/pkgs/games/nsnake/default.nix
+++ b/pkgs/games/nsnake/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "ncurses based snake game for the terminal";
+    mainProgram = "nsnake";
     homepage = "https://github.com/alexdantas/nSnake";
     license = lib.licenses.gpl3Plus;
     maintainers = with lib.maintainers; [ clerie ];
diff --git a/pkgs/games/nudoku/default.nix b/pkgs/games/nudoku/default.nix
index d3e3d039d9865..11e6fc0d8f289 100644
--- a/pkgs/games/nudoku/default.nix
+++ b/pkgs/games/nudoku/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An ncurses based sudoku game";
+    mainProgram = "nudoku";
     homepage = "http://jubalh.github.io/nudoku/";
     license = licenses.gpl3;
     platforms = platforms.all;
diff --git a/pkgs/games/oh-my-git/default.nix b/pkgs/games/oh-my-git/default.nix
index f2ac8b4289c60..9fe0fb9ac4205 100644
--- a/pkgs/games/oh-my-git/default.nix
+++ b/pkgs/games/oh-my-git/default.nix
@@ -127,6 +127,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://ohmygit.org/";
     description = "An interactive Git learning game";
+    mainProgram = "oh-my-git";
     license = with licenses; [ blueOak100 ];
     platforms   = [ "x86_64-linux" ];
     maintainers = with maintainers; [ jojosch ];
diff --git a/pkgs/games/onscripter-en/default.nix b/pkgs/games/onscripter-en/default.nix
index aaa14e6b2bd0f..edc9e20235ffe 100644
--- a/pkgs/games/onscripter-en/default.nix
+++ b/pkgs/games/onscripter-en/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation {
   meta = with lib; {
     broken = stdenv.isDarwin;
     description = "Japanese visual novel scripting engine";
+    mainProgram = "onscripter-en";
     homepage = "http://unclemion.com/onscripter/";
     license = licenses.gpl2;
     platforms = platforms.unix;
diff --git a/pkgs/games/opendune/default.nix b/pkgs/games/opendune/default.nix
index 32e1ef4fca93e..6df2a5b7a2069 100644
--- a/pkgs/games/opendune/default.nix
+++ b/pkgs/games/opendune/default.nix
@@ -39,6 +39,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Dune, Reinvented";
+    mainProgram = "opendune";
     homepage = "https://github.com/OpenDUNE/OpenDUNE";
     license = licenses.gpl2;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/games/opendungeons/default.nix b/pkgs/games/opendungeons/default.nix
index 10bcf19a53e7d..8755a07169bf2 100644
--- a/pkgs/games/opendungeons/default.nix
+++ b/pkgs/games/opendungeons/default.nix
@@ -64,6 +64,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "An open source, real time strategy game sharing game elements with the Dungeon Keeper series and Evil Genius";
+    mainProgram = "opendungeons";
     homepage = "https://opendungeons.github.io";
     license = with licenses; [ gpl3Plus zlib mit cc-by-sa-30 cc0 ofl cc-by-30 ];
     platforms = platforms.linux;
diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix
index b72f3877a4617..0f9060d235d78 100644
--- a/pkgs/games/openspades/default.nix
+++ b/pkgs/games/openspades/default.nix
@@ -59,6 +59,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A compatible client of Ace of Spades 0.75";
+    mainProgram = "openspades";
     homepage    = "https://github.com/yvt/openspades/";
     license     = licenses.gpl3;
     platforms   = platforms.all;
diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix
index 6122b586770e4..69a2c75fa4637 100644
--- a/pkgs/games/openttd/default.nix
+++ b/pkgs/games/openttd/default.nix
@@ -80,6 +80,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = ''Open source clone of the Microprose game "Transport Tycoon Deluxe"'';
+    mainProgram = "openttd";
     longDescription = ''
       OpenTTD is a transportation economics simulator. In single player mode,
       players control a transportation business, and use rail, road, sea, and air
diff --git a/pkgs/games/openttd/nml.nix b/pkgs/games/openttd/nml.nix
index 8ec8adf5f22b2..65dddce236e34 100644
--- a/pkgs/games/openttd/nml.nix
+++ b/pkgs/games/openttd/nml.nix
@@ -23,6 +23,7 @@ python3.pkgs.buildPythonApplication rec {
   meta = with lib; {
     homepage = "http://openttdcoop.org/";
     description = "Compiler for OpenTTD NML files";
+    mainProgram = "nmlc";
     license = licenses.gpl2;
     maintainers = with maintainers; [ ToxicFrog ];
   };
diff --git a/pkgs/games/opentyrian/default.nix b/pkgs/games/opentyrian/default.nix
index f01874ce9435a..1f0e9ae18a64b 100644
--- a/pkgs/games/opentyrian/default.nix
+++ b/pkgs/games/opentyrian/default.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = ''Open source port of the game "Tyrian"'';
+    mainProgram = "opentyrian";
     homepage = "https://github.com/opentyrian/opentyrian";
     # This does not account of Tyrian data.
     # license = lib.licenses.gpl2;
diff --git a/pkgs/games/openxcom/default.nix b/pkgs/games/openxcom/default.nix
index c09bd5c28f2ff..3ae8e23605daf 100644
--- a/pkgs/games/openxcom/default.nix
+++ b/pkgs/games/openxcom/default.nix
@@ -46,6 +46,7 @@ stdenv.mkDerivation {
 
   meta = {
     description = "Open source clone of UFO: Enemy Unknown";
+    mainProgram = "openxcom";
     homepage = "https://openxcom.org";
     license = lib.licenses.gpl3;
     maintainers = with lib.maintainers; [ cpages ];
diff --git a/pkgs/games/orthorobot/default.nix b/pkgs/games/orthorobot/default.nix
index 10bf3f9268e6d..bd491ce5c9137 100644
--- a/pkgs/games/orthorobot/default.nix
+++ b/pkgs/games/orthorobot/default.nix
@@ -68,6 +68,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Recharge the robot";
+    mainProgram = "orthorobot";
     maintainers = with maintainers; [ leenaars ];
     platforms = platforms.linux;
     license = licenses.free;
diff --git a/pkgs/games/pacvim/default.nix b/pkgs/games/pacvim/default.nix
index a4347550c1d23..a4458b0d085f0 100644
--- a/pkgs/games/pacvim/default.nix
+++ b/pkgs/games/pacvim/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation {
   meta = with lib; {
     homepage = "https://github.com/jmoon018/PacVim";
     description = "A game that teaches you vim commands";
+    mainProgram = "pacvim";
     maintainers = with maintainers; [ infinisil ];
     license = licenses.lgpl3;
     platforms = platforms.unix;
diff --git a/pkgs/games/pegasus-frontend/default.nix b/pkgs/games/pegasus-frontend/default.nix
index 051c8ccbe5426..a6459943a98ba 100644
--- a/pkgs/games/pegasus-frontend/default.nix
+++ b/pkgs/games/pegasus-frontend/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A cross platform, customizable graphical frontend for launching emulators and managing your game collection";
+    mainProgram = "pegasus-fe";
     homepage = "https://pegasus-frontend.org/";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ tengkuizdihar ];
diff --git a/pkgs/games/performous/default.nix b/pkgs/games/performous/default.nix
index 1305d8409f97f..20a40922544ed 100644
--- a/pkgs/games/performous/default.nix
+++ b/pkgs/games/performous/default.nix
@@ -78,6 +78,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Karaoke, band and dancing game";
+    mainProgram = "performous";
     homepage = "https://performous.org/";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ wegank ];
diff --git a/pkgs/games/pingus/default.nix b/pkgs/games/pingus/default.nix
index 9dd2195003907..adf393de9ed5f 100644
--- a/pkgs/games/pingus/default.nix
+++ b/pkgs/games/pingus/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A puzzle game with mechanics similar to Lemmings";
+    mainProgram = "pingus";
     platforms = lib.platforms.linux;
     maintainers = [lib.maintainers.raskin];
     license = lib.licenses.gpl3;
diff --git a/pkgs/games/pokerth/default.nix b/pkgs/games/pokerth/default.nix
index 021fe4100eaeb..642cd7ad8cb0d 100644
--- a/pkgs/games/pokerth/default.nix
+++ b/pkgs/games/pokerth/default.nix
@@ -67,6 +67,7 @@ mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.pokerth.net";
     description = "Poker game ${target}";
+    mainProgram = "pokerth";
     license = licenses.gpl3;
     maintainers = with maintainers; [ obadz yana ];
     platforms = platforms.all;
diff --git a/pkgs/games/pokete/default.nix b/pkgs/games/pokete/default.nix
index 73ff661e9d096..3a4d9a3c2031e 100644
--- a/pkgs/games/pokete/default.nix
+++ b/pkgs/games/pokete/default.nix
@@ -49,6 +49,7 @@ python3.pkgs.buildPythonApplication rec {
 
   meta = with lib; {
     description = "A terminal based Pokemon like game";
+    mainProgram = "pokete";
     homepage = "https://lxgr-linux.github.io/pokete";
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ fgaz ];
diff --git a/pkgs/games/powermanga/default.nix b/pkgs/games/powermanga/default.nix
index 5f82eaebb8eb2..0b0d27a0beadf 100644
--- a/pkgs/games/powermanga/default.nix
+++ b/pkgs/games/powermanga/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
     homepage = "https://linux.tlk.fr/games/Powermanga/";
     downloadPage = "https://linux.tlk.fr/games/Powermanga/download/";
     description = "An arcade 2D shoot-em-up game";
+    mainProgram = "powermanga";
     longDescription = ''
       Powermanga is an arcade 2D shoot-em-up game with 41 levels and more than
       200 sprites. It runs in 320x200 or 640x400 pixels, with Window mode or
diff --git a/pkgs/games/principia/default.nix b/pkgs/games/principia/default.nix
index 5074b3582c3e2..e97fc509c5b0a 100644
--- a/pkgs/games/principia/default.nix
+++ b/pkgs/games/principia/default.nix
@@ -59,6 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     changelog = "https://principia-web.se/wiki/Changelog#${lib.replaceStrings ["."] ["-"] finalAttrs.version}";
     description = "Physics-based sandbox game";
+    mainProgram = "principia";
     homepage = "https://principia-web.se/";
     downloadPage = "https://principia-web.se/download";
     license = licenses.bsd3;
diff --git a/pkgs/games/pro-office-calculator/default.nix b/pkgs/games/pro-office-calculator/default.nix
index 381a6e8742b0a..d49bb69cec0cb 100644
--- a/pkgs/games/pro-office-calculator/default.nix
+++ b/pkgs/games/pro-office-calculator/default.nix
@@ -16,6 +16,7 @@ mkDerivation rec {
 
   meta = with lib; {
     description = "A completely normal office calculator";
+    mainProgram = "procalc";
     homepage = "https://proofficecalculator.com/";
     maintainers = [ maintainers.pmiddend ];
     platforms = platforms.linux;
diff --git a/pkgs/games/pysolfc/default.nix b/pkgs/games/pysolfc/default.nix
index 7315d5e2724f7..fc0f95f6d8311 100644
--- a/pkgs/games/pysolfc/default.nix
+++ b/pkgs/games/pysolfc/default.nix
@@ -60,6 +60,7 @@ buildPythonApplication rec {
 
   meta = with lib; {
     description = "A collection of more than 1000 solitaire card games";
+    mainProgram = "pysol.py";
     homepage = "https://pysolfc.sourceforge.io";
     license = licenses.gpl3;
     maintainers = with maintainers; [ kierdavis ];
diff --git a/pkgs/games/qgo/default.nix b/pkgs/games/qgo/default.nix
index ec7986c6a36ba..6493dff2d3c11 100644
--- a/pkgs/games/qgo/default.nix
+++ b/pkgs/games/qgo/default.nix
@@ -13,6 +13,7 @@ mkDerivation {
 
   meta = with lib; {
     description = "A Go client based on Qt5";
+    mainProgram = "qgo";
     longDescription = ''
       qGo is a Go Client based on Qt 5. It supports playing online at
       IGS-compatible servers (including some special tweaks for WING and LGS,
diff --git a/pkgs/games/qqwing/default.nix b/pkgs/games/qqwing/default.nix
index 81a10b9ea2afe..95764a767aa7e 100644
--- a/pkgs/games/qqwing/default.nix
+++ b/pkgs/games/qqwing/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://qqwing.com";
     description = "Sudoku generating and solving software";
+    mainProgram = "qqwing";
     license = licenses.gpl2;
     platforms = platforms.unix;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/games/qtads/default.nix b/pkgs/games/qtads/default.nix
index 79a548a7134e9..aef921900ae77 100644
--- a/pkgs/games/qtads/default.nix
+++ b/pkgs/games/qtads/default.nix
@@ -20,6 +20,7 @@ mkDerivation rec {
   meta = with lib; {
     homepage = "https://realnc.github.io/qtads/";
     description = "Multimedia interpreter for TADS games";
+    mainProgram = "qtads";
     license = licenses.gpl3Plus;
     platforms = platforms.linux;
     maintainers = with maintainers; [ orivej ];
diff --git a/pkgs/games/quakespasm/vulkan.nix b/pkgs/games/quakespasm/vulkan.nix
index e9786a001e3af..81c49e5a017ce 100644
--- a/pkgs/games/quakespasm/vulkan.nix
+++ b/pkgs/games/quakespasm/vulkan.nix
@@ -49,6 +49,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Vulkan Quake port based on QuakeSpasm";
+    mainProgram = "vkquake";
     homepage = src.meta.homepage;
     longDescription = ''
       vkQuake is a Quake 1 port using Vulkan instead of OpenGL for rendering.
diff --git a/pkgs/games/quantumminigolf/default.nix b/pkgs/games/quantumminigolf/default.nix
index 7ecafa5eab657..803529b7f638d 100644
--- a/pkgs/games/quantumminigolf/default.nix
+++ b/pkgs/games/quantumminigolf/default.nix
@@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Quantum mechanics-based minigolf-like game";
+    mainProgram = "quantumminigolf";
     license = licenses.gpl2;
     maintainers = with maintainers; [ raskin ];
     platforms = platforms.linux;
diff --git a/pkgs/games/racer/default.nix b/pkgs/games/racer/default.nix
index bdb56c85dbff6..c6d9f654a480e 100644
--- a/pkgs/games/racer/default.nix
+++ b/pkgs/games/racer/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Car racing game";
+    mainProgram = "racer";
     homepage = "http://hippo.nipax.cz/download.en.php";
     license = lib.licenses.gpl2Plus;
     platforms = lib.platforms.linux;
diff --git a/pkgs/games/randtype/default.nix b/pkgs/games/randtype/default.nix
index 97993a5ffdac5..f7e6ee06ceac0 100644
--- a/pkgs/games/randtype/default.nix
+++ b/pkgs/games/randtype/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "semi-random text typer";
+    mainProgram = "randtype";
     homepage = "https://benkibbey.wordpress.com/randtype/";
     maintainers = with maintainers; [ dandellion ];
     license = licenses.gpl2Only;
diff --git a/pkgs/games/riko4/default.nix b/pkgs/games/riko4/default.nix
index 7014bf9ca21be..e5e0738d8b0e7 100644
--- a/pkgs/games/riko4/default.nix
+++ b/pkgs/games/riko4/default.nix
@@ -59,6 +59,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/incinirate/Riko4";
     description = "Fantasy console for pixel art game development";
+    mainProgram = "riko4";
     license = licenses.mit;
     maintainers = with maintainers; [ CrazedProgrammer ];
   };
diff --git a/pkgs/games/rocksndiamonds/default.nix b/pkgs/games/rocksndiamonds/default.nix
index feef993207ea6..6b1d51ab290b3 100644
--- a/pkgs/games/rocksndiamonds/default.nix
+++ b/pkgs/games/rocksndiamonds/default.nix
@@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Scrolling tile-based arcade style puzzle game";
+    mainProgram = "rocksndiamonds";
     homepage = "https://www.artsoft.org/rocksndiamonds/";
     license = licenses.gpl2;
     platforms = platforms.linux;
diff --git a/pkgs/games/rogue/default.nix b/pkgs/games/rogue/default.nix
index 4865b85bbe385..a30b856eed9ce 100644
--- a/pkgs/games/rogue/default.nix
+++ b/pkgs/games/rogue/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://rogue.rogueforge.net/rogue-5-4/";
     description = "The final version of the original Rogue game developed for the UNIX operating system";
+    mainProgram = "rogue";
     platforms = platforms.all;
     license = licenses.bsd3;
     maintainers = [ maintainers.eelco ];
diff --git a/pkgs/games/rott/default.nix b/pkgs/games/rott/default.nix
index 591275631fa95..534f14bcb289b 100644
--- a/pkgs/games/rott/default.nix
+++ b/pkgs/games/rott/default.nix
@@ -67,6 +67,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "SDL port of Rise of the Triad";
+    mainProgram = "rott";
     homepage = "https://icculus.org/rott/";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ sander ];
diff --git a/pkgs/games/rpg-cli/default.nix b/pkgs/games/rpg-cli/default.nix
index cad3b539d9ad2..b72a4f78008ea 100644
--- a/pkgs/games/rpg-cli/default.nix
+++ b/pkgs/games/rpg-cli/default.nix
@@ -18,6 +18,7 @@ rustPlatform.buildRustPackage rec {
 
   meta = with lib; {
     description = "Your filesystem as a dungeon";
+    mainProgram = "rpg-cli";
     homepage = "https://github.com/facundoolano/rpg-cli";
     license = licenses.mit;
     maintainers = with maintainers; [ lom ];
diff --git a/pkgs/games/rrootage/default.nix b/pkgs/games/rrootage/default.nix
index a5b656a4044a0..f1ad7b7e978d3 100644
--- a/pkgs/games/rrootage/default.nix
+++ b/pkgs/games/rrootage/default.nix
@@ -74,6 +74,7 @@ in stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Abstract shooter created by Kenta Cho";
+    mainProgram = "rrootage";
     homepage = "https://rrootage.sourceforge.net/";
     license = licenses.bsd2;
     maintainers = with maintainers; [ fgaz ];
diff --git a/pkgs/games/scummvm/default.nix b/pkgs/games/scummvm/default.nix
index 4d40dcc7686b8..bc92c3abbda32 100644
--- a/pkgs/games/scummvm/default.nix
+++ b/pkgs/games/scummvm/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Program to run certain classic graphical point-and-click adventure games (such as Monkey Island)";
+    mainProgram = "scummvm";
     homepage = "https://www.scummvm.org/";
     license = licenses.gpl2;
     maintainers = [ maintainers.peterhoeg ];
diff --git a/pkgs/games/sfrotz/default.nix b/pkgs/games/sfrotz/default.nix
index e90f1639e1702..1282e4d7258e1 100644
--- a/pkgs/games/sfrotz/default.nix
+++ b/pkgs/games/sfrotz/default.nix
@@ -46,6 +46,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description =
       "Interpreter for Infocom and other Z-Machine games (SDL interface)";
+    mainProgram = "sfrotz";
     longDescription = ''
       Frotz is a Z-Machine interpreter. The Z-machine is a virtual machine
       designed by Infocom to run all of their text adventures. It went through
diff --git a/pkgs/games/shticker-book-unwritten/default.nix b/pkgs/games/shticker-book-unwritten/default.nix
index f19fe258f70b9..9edefc9403467 100644
--- a/pkgs/games/shticker-book-unwritten/default.nix
+++ b/pkgs/games/shticker-book-unwritten/default.nix
@@ -18,6 +18,7 @@ in buildFHSEnv {
 
   meta = with lib; {
     description = "Minimal CLI launcher for the Toontown Rewritten MMORPG";
+    mainProgram = "shticker_book_unwritten";
     homepage = "https://github.com/JonathanHelianthicusDoe/shticker_book_unwritten";
     license = licenses.gpl3Plus;
     maintainers = [ maintainers.reedrw ];
diff --git a/pkgs/games/sienna/default.nix b/pkgs/games/sienna/default.nix
index c6f8db0ea9e7f..bee862ba2a08a 100644
--- a/pkgs/games/sienna/default.nix
+++ b/pkgs/games/sienna/default.nix
@@ -41,6 +41,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Fast-paced one button platformer";
+    mainProgram = "sienna";
     homepage = "https://tangramgames.dk/games/sienna";
     maintainers = with maintainers; [ leenaars ];
     platforms = platforms.linux;
diff --git a/pkgs/games/sil-q/default.nix b/pkgs/games/sil-q/default.nix
index 9127d4e9afc06..e029d77a02dbd 100644
--- a/pkgs/games/sil-q/default.nix
+++ b/pkgs/games/sil-q/default.nix
@@ -56,6 +56,7 @@ in stdenv.mkDerivation rec {
 
   meta = {
     description = "A roguelike game set in the First Age of Middle-earth";
+    mainProgram = "sil-q";
     longDescription = ''
       A game of adventure set in the First Age of Middle-earth, when the world still
       rang with Elven song and gleamed with Dwarven mail.
diff --git a/pkgs/games/simutrans/default.nix b/pkgs/games/simutrans/default.nix
index cc8b864c1f3ee..c89cdf7c8588f 100644
--- a/pkgs/games/simutrans/default.nix
+++ b/pkgs/games/simutrans/default.nix
@@ -154,6 +154,7 @@ let
 
     meta = with lib; {
       description = "A simulation game in which the player strives to run a successful transport system";
+      mainProgram = "simutrans";
       longDescription = ''
         Simutrans is a cross-platform simulation game in which the
         player strives to run a successful transport system by
diff --git a/pkgs/games/snipes/default.nix b/pkgs/games/snipes/default.nix
index 01b24ee434c3d..17a848402a517 100644
--- a/pkgs/games/snipes/default.nix
+++ b/pkgs/games/snipes/default.nix
@@ -40,6 +40,7 @@ in stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Modern port of the classic 1982 text-mode game Snipes";
+    mainProgram = "snipes";
     homepage    = "https://www.vogons.org/viewtopic.php?f=7&t=49073";
     license     = licenses.free; # This reverse-engineered source code is released with the original authors' permission.
     maintainers = with maintainers; [ peterhoeg ];
diff --git a/pkgs/games/soi/default.nix b/pkgs/games/soi/default.nix
index eb214752df841..e0526ff442351 100644
--- a/pkgs/games/soi/default.nix
+++ b/pkgs/games/soi/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A physics-based puzzle game";
+    mainProgram = "soi";
     maintainers = with maintainers; [ raskin ];
     platforms = platforms.linux;
     license = licenses.free;
diff --git a/pkgs/games/solicurses/default.nix b/pkgs/games/solicurses/default.nix
index 3b0a60cb1e817..afa49bbd5ce19 100644
--- a/pkgs/games/solicurses/default.nix
+++ b/pkgs/games/solicurses/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A version of Solitaire written in C++ using the ncurses library";
+    mainProgram = "solicurses";
     homepage = "https://github.com/KaylaPP/SoliCurses";
     maintainers = with maintainers; [ laalsaas ];
     license = licenses.gpl3Only;
diff --git a/pkgs/games/space-orbit/default.nix b/pkgs/games/space-orbit/default.nix
index 7e51d7a4b290c..7762bde4cfa5a 100644
--- a/pkgs/games/space-orbit/default.nix
+++ b/pkgs/games/space-orbit/default.nix
@@ -40,6 +40,7 @@ EOF
   meta = with lib; {
     broken = stdenv.isDarwin;
     description = "A space combat simulator";
+    mainProgram = "space-orbit";
     license = licenses.gpl2;
     platforms = platforms.all;
   };
diff --git a/pkgs/games/stardust/default.nix b/pkgs/games/stardust/default.nix
index 2555950506ab5..df9b2ca190c2f 100644
--- a/pkgs/games/stardust/default.nix
+++ b/pkgs/games/stardust/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Space flight simulator";
+    mainProgram = "stardust";
     maintainers = [ maintainers.raskin ];
     platforms = platforms.linux;
     license = licenses.gpl2Plus;
diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix
index 4a1cdb93fc063..936a3510b31de 100644
--- a/pkgs/games/steam/fhsenv.nix
+++ b/pkgs/games/steam/fhsenv.nix
@@ -304,6 +304,7 @@ in buildFHSEnv rec {
     then
       steam.meta // lib.optionalAttrs (!withGameSpecificLibraries) {
         description = steam.meta.description + " (without game specific libraries)";
+        mainProgram = "steam";
       }
     else {
       description = "Steam dependencies (dummy package, do not use)";
diff --git a/pkgs/games/stockfish/default.nix b/pkgs/games/stockfish/default.nix
index 21e3151b5844e..74eff702add19 100644
--- a/pkgs/games/stockfish/default.nix
+++ b/pkgs/games/stockfish/default.nix
@@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://stockfishchess.org/";
     description = "Strong open source chess engine";
+    mainProgram = "stockfish";
     longDescription = ''
       Stockfish is one of the strongest chess engines in the world. It is also
       much stronger than the best human chess grandmasters.
diff --git a/pkgs/games/super-tux-kart/default.nix b/pkgs/games/super-tux-kart/default.nix
index 3077d5b9443c1..1d55465d0092c 100644
--- a/pkgs/games/super-tux-kart/default.nix
+++ b/pkgs/games/super-tux-kart/default.nix
@@ -145,6 +145,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A Free 3D kart racing game";
+    mainProgram = "supertuxkart";
     longDescription = ''
       SuperTuxKart is a Free 3D kart racing game, with many tracks,
       characters and items for you to try, similar in spirit to Mario
diff --git a/pkgs/games/system-syzygy/default.nix b/pkgs/games/system-syzygy/default.nix
index c6591749a69b3..dee96f392c541 100644
--- a/pkgs/games/system-syzygy/default.nix
+++ b/pkgs/games/system-syzygy/default.nix
@@ -45,6 +45,7 @@ rustPlatform.buildRustPackage rec {
   meta = with lib; {
     broken = stdenv.isDarwin;
     description = "A story and a puzzle game, where you solve a variety of puzzle";
+    mainProgram = "syzygy";
     homepage = "https://mdsteele.games/syzygy";
     license = licenses.gpl3Plus;
     maintainers = [ maintainers.marius851000 ];
diff --git a/pkgs/games/taisei/default.nix b/pkgs/games/taisei/default.nix
index 886768786c10c..148329d32052d 100644
--- a/pkgs/games/taisei/default.nix
+++ b/pkgs/games/taisei/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     broken = stdenv.isDarwin;
     description = "A free and open-source Touhou Project clone and fangame";
+    mainProgram = "taisei";
     longDescription = ''
       Taisei is an open clone of the Tōhō Project series. Tōhō is a one-man
       project of shoot-em-up games set in an isolated world full of Japanese
diff --git a/pkgs/games/tecnoballz/default.nix b/pkgs/games/tecnoballz/default.nix
index f65383a37a897..b51cc1afed91f 100644
--- a/pkgs/games/tecnoballz/default.nix
+++ b/pkgs/games/tecnoballz/default.nix
@@ -54,6 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
     homepage = "https://linux.tlk.fr/games/TecnoballZ/";
     downloadPage = "https://linux.tlk.fr/games/TecnoballZ/download/";
     description = "A brick breaker game with a sophisticated system of weapons and bonuses";
+    mainProgram = "tecnoballz";
     longDescription = ''
       A exciting Brick Breaker with 50 levels of game and 11 special levels,
       distributed on the 2 modes of game to give the player a sophisticated
diff --git a/pkgs/games/teeworlds/default.nix b/pkgs/games/teeworlds/default.nix
index 30e4833d06667..505c61588e3e2 100644
--- a/pkgs/games/teeworlds/default.nix
+++ b/pkgs/games/teeworlds/default.nix
@@ -95,6 +95,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Retro multiplayer shooter game";
+    mainProgram = "teeworlds_srv";
 
     longDescription = ''
       Teeworlds is a free online multiplayer game, available for all
diff --git a/pkgs/games/tennix/default.nix b/pkgs/games/tennix/default.nix
index e5b2b358f3298..bcf30f947e23b 100644
--- a/pkgs/games/tennix/default.nix
+++ b/pkgs/games/tennix/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://icculus.org/tennix/";
     description = "Classic Championship Tour 2011";
+    mainProgram = "tennix";
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
     maintainers = with maintainers; [ pSub ];
diff --git a/pkgs/games/tes3cmd/default.nix b/pkgs/games/tes3cmd/default.nix
index 3778aadda9c57..b394c2323c217 100644
--- a/pkgs/games/tes3cmd/default.nix
+++ b/pkgs/games/tes3cmd/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A command line tool for examining and modifying plugins for the Elder Scrolls game Morrowind by Bethesda Softworks";
+    mainProgram = "tes3cmd";
     homepage = "https://github.com/john-moonsugar/tes3cmd";
     license = licenses.mit;
     maintainers = [ maintainers.marius851000 ];
diff --git a/pkgs/games/the-butterfly-effect/default.nix b/pkgs/games/the-butterfly-effect/default.nix
index 021dedc17bd9c..1d77be3c5a8ab 100644
--- a/pkgs/games/the-butterfly-effect/default.nix
+++ b/pkgs/games/the-butterfly-effect/default.nix
@@ -31,6 +31,7 @@ mkDerivation rec {
 
   meta = with lib; {
     description = "A physics-based game vaguely similar to Incredible Machine";
+    mainProgram = "tbe";
     homepage = "http://the-butterfly-effect.org/";
     maintainers = [ maintainers.raskin ];
     platforms = platforms.linux;
diff --git a/pkgs/games/theforceengine/default.nix b/pkgs/games/theforceengine/default.nix
index d2a843da42bc9..8695045d35287 100644
--- a/pkgs/games/theforceengine/default.nix
+++ b/pkgs/games/theforceengine/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Modern \"Jedi Engine\" replacement supporting Dark Forces, mods, and in the future, Outlaws";
+    mainProgram = "theforceengine";
     homepage = "https://theforceengine.github.io";
     license = licenses.gpl2Only;
     maintainers = with maintainers; [ devusb ];
diff --git a/pkgs/games/tinyfugue/default.nix b/pkgs/games/tinyfugue/default.nix
index a787d0b25bffa..d6b9647fcc021 100644
--- a/pkgs/games/tinyfugue/default.nix
+++ b/pkgs/games/tinyfugue/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://tinyfugue.sourceforge.net/";
     description = "A terminal UI, screen-oriented MUD client";
+    mainProgram = "tf";
     longDescription = ''
       TinyFugue, aka "tf", is a flexible, screen-oriented MUD client, for use
       with any type of text MUD.
diff --git a/pkgs/games/titanion/default.nix b/pkgs/games/titanion/default.nix
index 94e04a053c4e1..6b74eb351dd48 100644
--- a/pkgs/games/titanion/default.nix
+++ b/pkgs/games/titanion/default.nix
@@ -84,6 +84,7 @@ in stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "http://www.asahi-net.or.jp/~cs8k-cyu/windows/ttn_e.html";
     description = "Strike down super high-velocity swooping insects";
+    mainProgram = "titanion";
     license = licenses.bsd2;
     maintainers = with maintainers; [ fgaz ];
     platforms = platforms.all;
diff --git a/pkgs/games/tome4/default.nix b/pkgs/games/tome4/default.nix
index c05fd006aaac4..ffb52b01e2916 100644
--- a/pkgs/games/tome4/default.nix
+++ b/pkgs/games/tome4/default.nix
@@ -68,6 +68,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Tales of Maj'eyal (rogue-like game)";
+    mainProgram = "tome4";
     homepage = "https://te4.org/";
     license = licenses.gpl3;
     maintainers = with maintainers; [ peterhoeg ];
diff --git a/pkgs/games/torus-trooper/default.nix b/pkgs/games/torus-trooper/default.nix
index 6e39aac63ff62..5715be413b840 100644
--- a/pkgs/games/torus-trooper/default.nix
+++ b/pkgs/games/torus-trooper/default.nix
@@ -97,6 +97,7 @@ in stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html";
     description = "Fast-paced abstract scrolling shooter game";
+    mainProgram = "torus-trooper";
     license = licenses.bsd2;
     maintainers = with maintainers; [ fgaz ];
     platforms = platforms.all;
diff --git a/pkgs/games/tr-patcher/default.nix b/pkgs/games/tr-patcher/default.nix
index 0336ed1ac02f1..77788e8f27f23 100644
--- a/pkgs/games/tr-patcher/default.nix
+++ b/pkgs/games/tr-patcher/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Allow to update dependancies of the Tamriel-Data mod for morrowind";
+    mainProgram = "tr-patcher";
     homepage = "https://gitlab.com/bmwinger/tr-patcher";
     sourceProvenance = with sourceTypes; [ binaryBytecode ];
     license = licenses.gpl3;
diff --git a/pkgs/games/trackballs/default.nix b/pkgs/games/trackballs/default.nix
index 9ce9ad3ffc5eb..3c3d50eafdb1d 100644
--- a/pkgs/games/trackballs/default.nix
+++ b/pkgs/games/trackballs/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://trackballs.github.io/";
     description = "3D Marble Madness clone";
+    mainProgram = "trackballs";
     platforms = platforms.linux;
     # Music is licensed under Ethymonics Free Music License.
     license = licenses.gpl2Plus;
diff --git a/pkgs/games/trigger/default.nix b/pkgs/games/trigger/default.nix
index 57bc75d53820a..2182667173511 100644
--- a/pkgs/games/trigger/default.nix
+++ b/pkgs/games/trigger/default.nix
@@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A fast-paced single-player racing game";
+    mainProgram = "trigger-rally";
     homepage = "http://trigger-rally.sourceforge.net/";
     license = lib.licenses.gpl2;
     maintainers = with lib.maintainers; [viric];
diff --git a/pkgs/games/tumiki-fighters/default.nix b/pkgs/games/tumiki-fighters/default.nix
index 344d062e08c3b..0049412b0e6cd 100644
--- a/pkgs/games/tumiki-fighters/default.nix
+++ b/pkgs/games/tumiki-fighters/default.nix
@@ -90,6 +90,7 @@ in stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "http://www.asahi-net.or.jp/~cs8k-cyu/windows/tf_e.html";
     description = "Sticky 2D shooter";
+    mainProgram = "tumiki-fighters";
     license = licenses.bsd2;
     maintainers = with maintainers; [ fgaz ];
     platforms = platforms.all;
diff --git a/pkgs/games/tuxtype/default.nix b/pkgs/games/tuxtype/default.nix
index 0e32ebfbab97a..822dac9808dcc 100644
--- a/pkgs/games/tuxtype/default.nix
+++ b/pkgs/games/tuxtype/default.nix
@@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An Educational Typing Tutor Game Starring Tux, the Linux Penguin";
+    mainProgram = "tuxtype";
     homepage = "https://github.com/tux4kids/tuxtype";
     license = licenses.gpl3Plus;
     maintainers = [ maintainers.aanderse ];
diff --git a/pkgs/games/typespeed/default.nix b/pkgs/games/typespeed/default.nix
index 92d8768e4ffd8..483f631fcea9c 100644
--- a/pkgs/games/typespeed/default.nix
+++ b/pkgs/games/typespeed/default.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A curses based typing game";
+    mainProgram = "typespeed";
     homepage = "https://typespeed.sourceforge.net/";
     license = licenses.gpl2;
     platforms = platforms.unix;
diff --git a/pkgs/games/uchess/default.nix b/pkgs/games/uchess/default.nix
index 2d8c2efd4b760..fd0884bf6b184 100644
--- a/pkgs/games/uchess/default.nix
+++ b/pkgs/games/uchess/default.nix
@@ -25,6 +25,7 @@ buildGoModule rec {
 
   meta = with lib; {
     description = "Play chess against UCI engines in your terminal";
+    mainProgram = "uchess";
     homepage = "https://tmountain.github.io/uchess/";
     maintainers = with maintainers; [ tmountain ];
     license = licenses.mit;
diff --git a/pkgs/games/ultrastardx/default.nix b/pkgs/games/ultrastardx/default.nix
index fc80dec993786..e7401ac9dfbe3 100644
--- a/pkgs/games/ultrastardx/default.nix
+++ b/pkgs/games/ultrastardx/default.nix
@@ -80,6 +80,7 @@ in stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://usdx.eu/";
     description = "Free and open source karaoke game";
+    mainProgram = "ultrastardx";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ Profpatsch ];
     platforms = platforms.linux;
diff --git a/pkgs/games/umoria/default.nix b/pkgs/games/umoria/default.nix
index 13ec037afba78..91097ca542763 100644
--- a/pkgs/games/umoria/default.nix
+++ b/pkgs/games/umoria/default.nix
@@ -64,6 +64,7 @@ gcc9Stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://umoria.org/";
     description = "The Dungeons of Moria - the original roguelike";
+    mainProgram = "umoria";
     longDescription = ''
       The Dungeons of Moria is a single player dungeon simulation originally written
       by Robert Alan Koeneke, with its first public release in 1983.
diff --git a/pkgs/games/unnethack/default.nix b/pkgs/games/unnethack/default.nix
index f328b8c01eed7..15c5b1a81ebc0 100644
--- a/pkgs/games/unnethack/default.nix
+++ b/pkgs/games/unnethack/default.nix
@@ -69,6 +69,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Fork of NetHack";
+    mainProgram = "unnethack";
     homepage = "https://unnethack.wordpress.com/";
     license = "nethack";
     platforms = platforms.all;
diff --git a/pkgs/games/uqm/default.nix b/pkgs/games/uqm/default.nix
index 7da4c1e597b53..f81a48af2a67c 100644
--- a/pkgs/games/uqm/default.nix
+++ b/pkgs/games/uqm/default.nix
@@ -93,6 +93,7 @@ in stdenv.mkDerivation rec {
 
   meta = {
     description = "Remake of Star Control II";
+    mainProgram = "uqm";
     longDescription = ''
       The goals for the The Ur-Quan Masters project are:
         - to bring Star Control II to modern platforms, thereby making a lot of
diff --git a/pkgs/games/vdrift/default.nix b/pkgs/games/vdrift/default.nix
index 50fb4af1416a0..a88adbdf19de5 100644
--- a/pkgs/games/vdrift/default.nix
+++ b/pkgs/games/vdrift/default.nix
@@ -49,6 +49,7 @@ let
 
     meta = {
       description = "Car racing game";
+      mainProgram = "vdrift";
       homepage = "http://vdrift.net/";
       license = lib.licenses.gpl2Plus;
       maintainers = with lib.maintainers; [ viric ];
diff --git a/pkgs/games/vectoroids/default.nix b/pkgs/games/vectoroids/default.nix
index 82c1571044399..c3e383a84b640 100644
--- a/pkgs/games/vectoroids/default.nix
+++ b/pkgs/games/vectoroids/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://www.newbreedsoftware.com/vectoroids/";
     description = "Clone of the classic arcade game Asteroids by Atari";
+    mainProgram = "vectoroids";
     license = lib.licenses.gpl2Plus;
     platforms = lib.platforms.linux;
   };
diff --git a/pkgs/games/vms-empire/default.nix b/pkgs/games/vms-empire/default.nix
index b3e89617ef33a..9da37789f7cd4 100644
--- a/pkgs/games/vms-empire/default.nix
+++ b/pkgs/games/vms-empire/default.nix
@@ -46,6 +46,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://catb.org/~esr/vms-empire/";
     description = "The ancestor of all expand/explore/exploit/exterminate games";
+    mainProgram = "vms-empire";
     longDescription = ''
       Empire is a simulation of a full-scale war between two emperors, the
       computer and you. Naturally, there is only room for one, so the object of
diff --git a/pkgs/games/warzone2100/default.nix b/pkgs/games/warzone2100/default.nix
index 7e6b8986109ea..a39b7915b187b 100644
--- a/pkgs/games/warzone2100/default.nix
+++ b/pkgs/games/warzone2100/default.nix
@@ -123,6 +123,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A free RTS game, originally developed by Pumpkin Studios";
+    mainProgram = "warzone2100";
     longDescription = ''
         Warzone 2100 is an open source real-time strategy and real-time tactics
       hybrid computer game, originally developed by Pumpkin Studios and
diff --git a/pkgs/games/wireworld/default.nix b/pkgs/games/wireworld/default.nix
index 828d313d2a874..14a7310e7a977 100644
--- a/pkgs/games/wireworld/default.nix
+++ b/pkgs/games/wireworld/default.nix
@@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Fascinating electronics logic puzzles, game where you'll learn how to build clocks, diodes, and logic gates";
+    mainProgram = "Wireworld";
     license = with licenses; [
       mit
       ofl
diff --git a/pkgs/games/wolfstoneextract/default.nix b/pkgs/games/wolfstoneextract/default.nix
index 159e6ae3f15ca..b2d76e41d57c3 100644
--- a/pkgs/games/wolfstoneextract/default.nix
+++ b/pkgs/games/wolfstoneextract/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "Utility to extract Wolfstone data from Wolfenstein II";
+    mainProgram = "wolfstoneextract";
     homepage = "https://bitbucket.org/ecwolf/wolfstoneextract/src/master/";
     platforms = [ "x86_64-linux" ];
     license = with licenses; [ gpl3Only bsd3 ];
diff --git a/pkgs/games/wyvern/default.nix b/pkgs/games/wyvern/default.nix
index 6eae1a4e71b20..705d6a33db5fa 100644
--- a/pkgs/games/wyvern/default.nix
+++ b/pkgs/games/wyvern/default.nix
@@ -24,6 +24,7 @@ rustPlatform.buildRustPackage rec {
 
   meta = with lib; {
     description = "A simple CLI client for installing and maintaining linux GOG games";
+    mainProgram = "wyvern";
     homepage = "https://git.sr.ht/~nicohman/wyvern";
     license = licenses.gpl3;
     maintainers = with maintainers; [ _0x4A6F ];
diff --git a/pkgs/games/xboard/default.nix b/pkgs/games/xboard/default.nix
index af75ec79e730c..ac8ae684f1df6 100644
--- a/pkgs/games/xboard/default.nix
+++ b/pkgs/games/xboard/default.nix
@@ -60,6 +60,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GUI for chess engines";
+    mainProgram = "xboard";
     homepage = "https://www.gnu.org/software/xboard/";
     maintainers = with maintainers; [ raskin ];
     platforms = platforms.unix;
diff --git a/pkgs/games/xbomb/default.nix b/pkgs/games/xbomb/default.nix
index 093f822a7e314..92227ec1ebd18 100644
--- a/pkgs/games/xbomb/default.nix
+++ b/pkgs/games/xbomb/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://www.gedanken.org.uk/software/xbomb/";
     description = "Minesweeper for X11 with various grid sizes and shapes";
+    mainProgram = "xbomb";
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
   };
diff --git a/pkgs/games/xgalaga++/default.nix b/pkgs/games/xgalaga++/default.nix
index daccc84e681e1..9b2bd5a9af736 100644
--- a/pkgs/games/xgalaga++/default.nix
+++ b/pkgs/games/xgalaga++/default.nix
@@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://marc.mongenet.ch/OSS/XGalaga/";
     description = "XGalaga++ is a classic single screen vertical shoot ’em up. It is inspired by XGalaga and reuses most of its sprites";
+    mainProgram = "xgalaga++";
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
   };
diff --git a/pkgs/games/xjump/default.nix b/pkgs/games/xjump/default.nix
index 2c56e0bba4f66..2113ffbda116e 100644
--- a/pkgs/games/xjump/default.nix
+++ b/pkgs/games/xjump/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "The falling tower game";
+    mainProgram = "xjump";
     license = licenses.gpl2;
     maintainers = with maintainers; [ pmeunier ];
   };
diff --git a/pkgs/games/xmage/default.nix b/pkgs/games/xmage/default.nix
index 59752e72e50d7..656eee3ce6171 100644
--- a/pkgs/games/xmage/default.nix
+++ b/pkgs/games/xmage/default.nix
@@ -38,6 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "Magic Another Game Engine";
+    mainProgram = "xmage";
     sourceProvenance = with sourceTypes; [ binaryBytecode ];
     license = licenses.mit;
     maintainers = with maintainers; [ matthiasbeyer abueide ];
diff --git a/pkgs/games/xmoto/default.nix b/pkgs/games/xmoto/default.nix
index 5909c3f20ee46..23ed54e6b8e49 100644
--- a/pkgs/games/xmoto/default.nix
+++ b/pkgs/games/xmoto/default.nix
@@ -53,6 +53,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A challenging 2D motocross platform game, where physics play an important role";
+    mainProgram = "xmoto";
     longDescription = ''
       X-Moto is a challenging 2D motocross platform game, where physics plays an all important role in the gameplay.
       You need to control your bike to its limits, if you want to have a chance to finish the most difficult challenges.
diff --git a/pkgs/games/xpilot/bloodspilot-client.nix b/pkgs/games/xpilot/bloodspilot-client.nix
index 8e603ef53f78b..58eb7e8151645 100644
--- a/pkgs/games/xpilot/bloodspilot-client.nix
+++ b/pkgs/games/xpilot/bloodspilot-client.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A multiplayer space combat game (client part)";
+    mainProgram = "bloodspilot-client-sdl";
     homepage = "http://bloodspilot.sf.net/";
     license = lib.licenses.gpl2Plus ;
     maintainers = [lib.maintainers.raskin];
diff --git a/pkgs/games/xpilot/bloodspilot-server.nix b/pkgs/games/xpilot/bloodspilot-server.nix
index a860c4e1d5ffb..495412c0eab46 100644
--- a/pkgs/games/xpilot/bloodspilot-server.nix
+++ b/pkgs/games/xpilot/bloodspilot-server.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A multiplayer X11 space combat game (server part)";
+    mainProgram = "xpilots";
     homepage = "http://bloodspilot.sf.net/";
     license = licenses.gpl2Plus ;
     maintainers = [ maintainers.raskin ];
diff --git a/pkgs/games/xskat/default.nix b/pkgs/games/xskat/default.nix
index 0d9fc5fe312f7..6f28a6846ea75 100644
--- a/pkgs/games/xskat/default.nix
+++ b/pkgs/games/xskat/default.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Famous german card game";
+    mainProgram = "xskat";
     platforms = platforms.unix;
     license = licenses.xskat;
     longDescription = "Play the german card game Skat against the AI or over IRC.";
diff --git a/pkgs/games/xsnow/default.nix b/pkgs/games/xsnow/default.nix
index ff34bfe729bab..fe744375d79b8 100644
--- a/pkgs/games/xsnow/default.nix
+++ b/pkgs/games/xsnow/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An X-windows application that will let it snow on the root, in between and on windows";
+    mainProgram = "xsnow";
     homepage = "https://ratrabbit.nl/ratrabbit/xsnow/";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ robberer ];
diff --git a/pkgs/games/xsok/default.nix b/pkgs/games/xsok/default.nix
index 53254ba98f91d..51ca06a9091c1 100644
--- a/pkgs/games/xsok/default.nix
+++ b/pkgs/games/xsok/default.nix
@@ -38,6 +38,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A generic Sokoban game for X11";
+    mainProgram = "xsok";
     license = lib.licenses.gpl2Plus;
     maintainers = [lib.maintainers.raskin];
     platforms = lib.platforms.unix;
diff --git a/pkgs/games/xsokoban/default.nix b/pkgs/games/xsokoban/default.nix
index 4d8a6fa050568..51de995af4bc4 100644
--- a/pkgs/games/xsokoban/default.nix
+++ b/pkgs/games/xsokoban/default.nix
@@ -47,6 +47,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "X sokoban";
+    mainProgram = "xsokoban";
     license = licenses.publicDomain;
     maintainers = [ maintainers.raskin ];
     platforms = platforms.linux;