2023-10-09 19:29:22 +00:00
|
|
|
{ appimageTools
|
|
|
|
, fetchurl
|
|
|
|
, lib
|
2023-10-19 13:55:26 +00:00
|
|
|
, makeWrapper
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
2021-04-17 00:35:05 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
appimageTools.wrapType2 rec {
|
2024-09-19 14:19:46 +00:00
|
|
|
pname = "lunarclient";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "3.2.19";
|
2020-11-19 00:13:47 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://launcherupdates.lunarclientcdn.com/Lunar%20Client-${version}.AppImage";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha512-OLXp355IxMmhLtsxNVj0/ykl2lGJtwu1Ti3TOJZ1dwTsx/Y+tdeFT+WeDAju9fMC2AssciUnAeqqdp76sHxUgw==";
|
2020-11-19 00:13:47 +00:00
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
extraInstallCommands =
|
|
|
|
let contents = appimageTools.extract { inherit pname version src; };
|
|
|
|
in ''
|
2024-09-19 14:19:46 +00:00
|
|
|
wrapProgram $out/bin/lunarclient \
|
2024-01-25 14:12:00 +00:00
|
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
|
2024-09-19 14:19:46 +00:00
|
|
|
install -Dm444 ${contents}/lunarclient.desktop -t $out/share/applications/
|
|
|
|
install -Dm444 ${contents}/lunarclient.png -t $out/share/pixmaps/
|
|
|
|
substituteInPlace $out/share/applications/lunarclient.desktop \
|
|
|
|
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=lunarclient' \
|
2024-01-25 14:12:00 +00:00
|
|
|
'';
|
2020-11-19 00:13:47 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Free Minecraft client with mods, cosmetics, and performance boost";
|
2020-11-19 00:13:47 +00:00
|
|
|
homepage = "https://www.lunarclient.com/";
|
|
|
|
license = with licenses; [ unfree ];
|
2024-09-19 14:19:46 +00:00
|
|
|
mainProgram = "lunarclient";
|
2024-07-27 06:49:29 +00:00
|
|
|
maintainers = with maintainers; [ Technical27 surfaceflinger ];
|
2020-11-19 00:13:47 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|