From 5690b06fd38da337d668512cf0e983a154473dec Mon Sep 17 00:00:00 2001 From: Erik Simon Date: Sat, 14 Nov 2026 19:12:48 +0100 Subject: [PATCH] feat(terra): Epic Games Launcher Preview in a Steam-runtime FHS env Co-Authored-By: Claude Opus 5.5 --- hosts/terra/configuration.nix | 1 + services/desktop/desktop-apps.nix | 2 + services/desktop/epic-games-launcher.nix | 70 ++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 services/desktop/epic-games-launcher.nix diff --git a/hosts/terra/configuration.nix b/hosts/terra/configuration.nix index 4126b9e..c848173 100644 --- a/hosts/terra/configuration.nix +++ b/hosts/terra/configuration.nix @@ -20,6 +20,7 @@ in ../../services/desktop/star-citizen.nix ../../services/desktop/nexusmods-app.nix ../../services/desktop/unreal-engine.nix + ../../services/desktop/epic-games-launcher.nix inputs.tbctl.nixosModules.tbctl ]; diff --git a/services/desktop/desktop-apps.nix b/services/desktop/desktop-apps.nix index fb7a12a..103f991 100644 --- a/services/desktop/desktop-apps.nix +++ b/services/desktop/desktop-apps.nix @@ -17,6 +17,8 @@ in "steam-run" "rsi-launcher" # services/desktop/star-citizen.nix (terra) "rsi-installer" + "epic-games-launcher" # services/desktop/epic-games-launcher.nix (terra) + "epic-games-launcher-unwrapped" "teamspeak6-client" # terra "7zz" # nexusmods-app-unfree (terra): RAR support "uasm" # builds 7zz diff --git a/services/desktop/epic-games-launcher.nix b/services/desktop/epic-games-launcher.nix new file mode 100644 index 0000000..81d8a6f --- /dev/null +++ b/services/desktop/epic-games-launcher.nix @@ -0,0 +1,70 @@ +{ pkgs, lib, ... }: + +# Epic Games Launcher Preview (EGLv2): Epic's .deb, run unpatched in the same +# Steam-runtime FHS env as heroic, since the GE-Proton it downloads to +# ~/.local/share/com.epicgames.eglv2/compat needs those libraries too. +# Bump: version + commit from the 303 Location of +# https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncher-x86_64.deb +let + version = "0.115.0"; + commit = "gd6d2ef8"; + + unwrapped = pkgs.stdenvNoCC.mkDerivation { + pname = "epic-games-launcher-unwrapped"; + inherit version; + src = pkgs.fetchurl { + url = "https://content-download-egs.distro.on.epicgames.com/Builds/EGLv2/${version}%2B${commit}/Linux/EpicGamesLauncher-x86_64.deb"; + hash = "sha256-YYrcC8x3i7sfSXOBENXCGehh7Uy3rbcrJPtVAxVqbWM="; + }; + nativeBuildInputs = [ pkgs.dpkg ]; + unpackCmd = "dpkg-deb -x $curSrc root"; + dontBuild = true; + dontStrip = true; + dontPatchELF = true; + # RUNPATH $ORIGIN/../lib/epic-games-launcher finds the EOS SDK in place. + installPhase = '' + mkdir -p $out + cp -r usr/* $out/ + substituteInPlace $out/share/applications/epic-games-launcher.desktop \ + --replace-fail "Exec=EpicGamesLauncher" "Exec=epic-games-launcher" + ''; + meta = { + description = "Epic Games Launcher Preview"; + homepage = "https://store.epicgames.com/download"; + license = lib.licenses.unfree; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + platforms = [ "x86_64-linux" ]; + }; + }; + + launcher = pkgs.steam.buildRuntimeEnv { + pname = "epic-games-launcher"; + inherit version; + inherit (unwrapped) meta; + + runScript = "${unwrapped}/bin/EpicGamesLauncher"; + + extraPkgs = p: with p; [ + webkitgtk_4_1 + libsoup_3 + gtk3 + libayatana-appindicator + libsecret # tokens go to gnome-keyring via org.freedesktop.secrets + xdg-utils + ]; + + # Its updater would write into the store. + extraEnv.EGL_DISABLE_SELF_UPDATE = "1"; + + extraInstallCommands = '' + mkdir -p $out/share + ln -s ${unwrapped}/share/applications $out/share + ln -s ${unwrapped}/share/icons $out/share + ''; + + privateTmp = false; + }; +in +{ + environment.systemPackages = [ launcher ]; +}