about summary refs log tree commit diff
path: root/pkgs/games/badlion-client/default.nix
blob: 8102da7673432958057eb8ee3633b49d66893257 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, fetchurl, appimageTools }:

let
  pname = "badlion-client";
  version = "4.3.0";

  src = fetchurl {
    name = "badlion-client-linux";
    # https://www.badlion.net/download/client/latest/linux
    url = "https://web.archive.org/web/20240529090437if_/https://client-updates-cdn77.badlion.net/BadlionClient";
    hash = "sha256-9elNLSqCO21m1T2D+WABKotD9FfW3FrcOxbnPdyVd+w=";
  };

  appimageContents = appimageTools.extract { inherit pname version src; };
in
  appimageTools.wrapType2 rec {
    inherit pname version src;

    extraInstallCommands = ''
      install -Dm444 ${appimageContents}/BadlionClient.desktop $out/share/applications/BadlionClient.desktop
      install -Dm444 ${appimageContents}/BadlionClient.png $out/share/pixmaps/BadlionClient.png
      substituteInPlace $out/share/applications/BadlionClient.desktop \
        --replace 'Exec=AppRun --no-sandbox %U' 'Exec=badlion-client'
    '';

    meta = with lib; {
      description = "Most Complete All-In-One Mod Library for Minecraft with 100+ Mods, FPS Improvements, and more";
      homepage = "https://client.badlion.net";
      license = with licenses; [ unfree ];
      maintainers = with maintainers; [ ];
      mainProgram = "badlion-client";
      platforms = [ "x86_64-linux" ];
    };
  }