From 5ac79dd2ce7b9fb86668241170188787fee9af14 Mon Sep 17 00:00:00 2001 From: "P. R. d. O" Date: Fri, 3 Dec 2021 14:57:34 -0600 Subject: [PATCH] heroic: init at 1.10.3 --- pkgs/games/heroic/default.nix | 38 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/games/heroic/default.nix diff --git a/pkgs/games/heroic/default.nix b/pkgs/games/heroic/default.nix new file mode 100644 index 000000000000..e6413a87f2ca --- /dev/null +++ b/pkgs/games/heroic/default.nix @@ -0,0 +1,38 @@ +{ lib, fetchurl, appimageTools, python }: + +let + pname = "heroic"; + version = "1.10.3"; + name = "${pname}-${version}"; + src = fetchurl { + url = "https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/download/v${version}/Heroic-${version}.AppImage"; + sha256 = "sha256-0VQ5rSGGsEAsOLB4H/Hn2w7wCOrCSoVFzCBqNV5NyVE="; + }; + appimageContents = appimageTools.extractType2 { inherit name src; }; + +in appimageTools.wrapType2 { + inherit name src; + + extraInstallCommands = '' + mv $out/bin/${name} $out/bin/${pname} + + mkdir -p $out/share/${pname} + cp -a ${appimageContents}/locales $out/share/${pname} + cp -a ${appimageContents}/resources $out/share/${pname} + + install -m 444 -D ${appimageContents}/heroic.desktop -t $out/share/applications + + cp -a ${appimageContents}/usr/share/icons $out/share/ + + substituteInPlace $out/share/applications/heroic.desktop \ + --replace 'Exec=AppRun' 'Exec=heroic' + ''; + + meta = with lib; { + description = "A Native GUI Epic Games Launcher for Linux, Windows and Mac"; + homepage = "https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ wolfangaukang ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7674300b4e59..4de576e9ebe2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3144,6 +3144,8 @@ with pkgs; hebcal = callPackage ../tools/misc/hebcal {}; + heroic = callPackage ../games/heroic {}; + hexio = callPackage ../development/tools/hexio { }; hexyl = callPackage ../tools/misc/hexyl { };