about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/heroic/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/heroic/default.nix')
-rw-r--r--nixpkgs/pkgs/games/heroic/default.nix23
1 files changed, 18 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;