From 43bd67d4ce6d0a546d631e5ab3833f5598c17ec3 Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Tue, 18 Feb 2025 19:24:32 +1300 Subject: [PATCH 1/3] legendary-heroic: init at 0.20.36 --- pkgs/by-name/le/legendary-heroic/package.nix | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pkgs/by-name/le/legendary-heroic/package.nix diff --git a/pkgs/by-name/le/legendary-heroic/package.nix b/pkgs/by-name/le/legendary-heroic/package.nix new file mode 100644 index 000000000000..c0fbd88df158 --- /dev/null +++ b/pkgs/by-name/le/legendary-heroic/package.nix @@ -0,0 +1,42 @@ +{ + lib, + gitUpdater, + fetchFromGitHub, + python3Packages, +}: +let + version = "0.20.36"; +in +python3Packages.buildPythonApplication { + pname = "legendary-heroic"; + inherit version; + + src = fetchFromGitHub { + owner = "Heroic-Games-Launcher"; + repo = "legendary"; + rev = version; + sha256 = "sha256-+aywgd5RZfkmVuA0MaF2/Ie4a5If/zQxvVCcTfGpQpE="; + }; + + propagatedBuildInputs = with python3Packages; [ + requests + filelock + ]; + + disabled = python3Packages.pythonOlder "3.8"; + + pythonImportsCheck = [ "legendary" ]; + + meta = with lib; { + description = "Free and open-source Epic Games Launcher alternative"; + longDescription = '' + This is the Heroic Games Launcher's fork of legendary. + ''; + homepage = "https://github.com/Heroic-Games-Launcher/legendary"; + license = licenses.gpl3; + maintainers = with maintainers; [ aidalgol ]; + mainProgram = "legendary"; + }; + + passthru.updateScript = gitUpdater { }; +} From c141b3bc3a26ad8b931c1d4bd557b0642169105f Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Tue, 18 Feb 2025 19:25:34 +1300 Subject: [PATCH 2/3] heroic: use correct legendary package Upstream uses its own fork of legendary, which fixes some major breakages. --- pkgs/games/heroic/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/heroic/default.nix b/pkgs/games/heroic/default.nix index c14915ccdbd8..831ad9a75252 100644 --- a/pkgs/games/heroic/default.nix +++ b/pkgs/games/heroic/default.nix @@ -10,7 +10,7 @@ electron, vulkan-helper, gogdl, - legendary-gl, + legendary-heroic, nile, comet-gog, }: @@ -79,7 +79,7 @@ stdenv.mkDerivation (finalAttrs: { mkdir -p "$out/opt/heroic/resources/app.asar.unpacked/build/bin/x64/linux" ln -s \ "${lib.getExe gogdl}" \ - "${lib.getExe legendary-gl}" \ + "${lib.getExe legendary-heroic}" \ "${lib.getExe nile}" \ "${lib.getExe comet-gog}" \ "${lib.getExe vulkan-helper}" \ From 859a89b436058ff03fe6632f4e8d0be6c0850313 Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Thu, 20 Feb 2025 18:27:01 +1300 Subject: [PATCH 3/3] heroic: add pciutils to FHS env Heroic uses lspci to get GPU information. --- pkgs/games/heroic/fhsenv.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/games/heroic/fhsenv.nix b/pkgs/games/heroic/fhsenv.nix index fb1b633d22b2..25c9bf3c100f 100644 --- a/pkgs/games/heroic/fhsenv.nix +++ b/pkgs/games/heroic/fhsenv.nix @@ -31,6 +31,7 @@ buildFHSEnv { nettools opencl-headers p7zip + pciutils perl psmisc python3