diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-08-23 10:09:14 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-08-26 09:07:03 +0000 |
commit | 63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f (patch) | |
tree | d58934cb48f9c953b19a0d0d5cffc0d0c5561471 /nixpkgs/pkgs/games/heroic | |
parent | c4eef3dacb2a3d359561f30917d9e3cc4e041be9 (diff) | |
parent | 91a22f76cd1716f9d0149e8a5c68424bb691de15 (diff) | |
download | nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.gz nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.bz2 nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.lz nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.xz nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.zst nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix
Diffstat (limited to 'nixpkgs/pkgs/games/heroic')
-rw-r--r-- | nixpkgs/pkgs/games/heroic/default.nix | 23 | ||||
-rw-r--r-- | nixpkgs/pkgs/games/heroic/fix-non-steam-shortcuts.patch | 13 | ||||
-rw-r--r-- | nixpkgs/pkgs/games/heroic/remove-drm-support.patch | 24 |
3 files changed, 55 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/games/heroic/default.nix b/nixpkgs/pkgs/games/heroic/default.nix index 1baf9cbf8163..05455ae7c7d6 100644 --- a/nixpkgs/pkgs/games/heroic/default.nix +++ b/nixpkgs/pkgs/games/heroic/default.nix @@ -10,23 +10,24 @@ , electron , gogdl , legendary-gl +, nile }: let appName = "heroic"; in stdenv.mkDerivation rec { pname = "heroic-unwrapped"; - version = "2.8.0"; + version = "2.9.1"; src = fetchFromGitHub { owner = "Heroic-Games-Launcher"; repo = "HeroicGamesLauncher"; rev = "v${version}"; - hash = "sha256-AZwJRBkWuzBPT+ADVHabiK2KRXe6clZFa0IO99BO2Wk="; + hash = "sha256-1FtAcp6cG2qRfWrAgCOQ87DzMvszqqhObfSzepezBGc="; }; offlineCache = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; - hash = "sha256-xiLK0D9+oL2UMD7b/9htOQJEpYCNayKW+KJ/vNVCgsw="; + hash = "sha256-KEzTjtoBcHNJxC/7W/Bft75JZuZUSHieOOAwhbr5d3s="; }; nativeBuildInputs = [ @@ -37,6 +38,14 @@ in stdenv.mkDerivation rec { makeWrapper ]; + patches = [ + # Reverts part of upstream PR 2761 so that we don't have to use a non-free Electron fork. + # https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/2761 + ./remove-drm-support.patch + # Make Heroic create Steam shortcuts (to non-steam games) with the correct path to heroic. + ./fix-non-steam-shortcuts.patch + ]; + configurePhase = '' runHook preConfigure @@ -74,7 +83,11 @@ in stdenv.mkDerivation rec { chmod -R u+w "$out/share/${appName}/public/bin" "$out/share/${appName}/build/bin" rm -rf "$out/share/${appName}/public/bin" "$out/share/${appName}/build/bin" mkdir -p "$out/share/${appName}/build/bin/${binPlatform}" - ln -s "${gogdl}/bin/gogdl" "${legendary-gl}/bin/legendary" "$out/share/${appName}/build/bin/${binPlatform}" + ln -s \ + "${gogdl}/bin/gogdl" \ + "${legendary-gl}/bin/legendary" \ + "${nile}"/bin/nile \ + "$out/share/${appName}/build/bin/${binPlatform}" makeWrapper "${electron}/bin/electron" "$out/bin/heroic" \ --inherit-argv0 \ @@ -92,7 +105,7 @@ in stdenv.mkDerivation rec { ''; meta = with lib; { - description = "A Native GOG and Epic Games Launcher for Linux, Windows and Mac"; + description = "A Native GOG, Epic, and Amazon Games Launcher for Linux, Windows and Mac"; homepage = "https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher"; changelog = "https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases"; license = licenses.gpl3Only; diff --git a/nixpkgs/pkgs/games/heroic/fix-non-steam-shortcuts.patch b/nixpkgs/pkgs/games/heroic/fix-non-steam-shortcuts.patch new file mode 100644 index 000000000000..7b46473245f7 --- /dev/null +++ b/nixpkgs/pkgs/games/heroic/fix-non-steam-shortcuts.patch @@ -0,0 +1,13 @@ +diff --git a/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts b/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts +index ebef6aa4..c8bd853d 100644 +--- a/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts ++++ b/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts +@@ -252,7 +252,7 @@ async function addNonSteamGame(props: { + // add new Entry + const newEntry = {} as ShortcutEntry + newEntry.AppName = props.gameInfo.title +- newEntry.Exe = `"${app.getPath('exe')}"` ++ newEntry.Exe = `"heroic"` + newEntry.StartDir = `"${process.cwd()}"` + + if (isFlatpak) { diff --git a/nixpkgs/pkgs/games/heroic/remove-drm-support.patch b/nixpkgs/pkgs/games/heroic/remove-drm-support.patch new file mode 100644 index 000000000000..f3cd80f003f3 --- /dev/null +++ b/nixpkgs/pkgs/games/heroic/remove-drm-support.patch @@ -0,0 +1,24 @@ +diff --git a/src/backend/main.ts b/src/backend/main.ts +index 2cd1a28f..a60e04d0 100644 +--- a/src/backend/main.ts ++++ b/src/backend/main.ts +@@ -19,8 +19,7 @@ import { + powerSaveBlocker, + protocol, + screen, +- clipboard, +- components ++ clipboard + } from 'electron' + import 'backend/updater' + import { autoUpdater } from 'electron-updater' +@@ -286,8 +285,7 @@ if (!gotTheLock) { + initImagesCache() + + if (!process.env.CI) { +- await components.whenReady() +- logInfo(['DRM module staus', components.status()]) ++ logInfo('DRM modules disabled for nixpkgs') + } + + // try to fix notification app name on windows |