8 pname = "lunar-client";
12 url = "https://launcherupdates.lunarclientcdn.com/Lunar%20Client-${version}.AppImage";
13 hash = "sha512-YUddAvsPbuuOvhJZsWDvgF/7yghABU6Av7DcKNX1bKZqE3BzMAAQADJuNuNL4+UydoTaHetXvRO8oJCbrqgtAQ==";
16 appimageContents = appimageTools.extract { inherit pname version src; };
18 appimageTools.wrapType2 rec {
19 inherit pname version src;
21 extraInstallCommands = ''
22 mv $out/bin/{${pname}-${version},${pname}}
23 source "${makeWrapper}/nix-support/setup-hook"
24 wrapProgram $out/bin/${pname} \
25 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
26 install -Dm444 ${appimageContents}/launcher.desktop $out/share/applications/lunar-client.desktop
27 install -Dm444 ${appimageContents}/launcher.png $out/share/pixmaps/lunar-client.png
28 substituteInPlace $out/share/applications/lunar-client.desktop \
29 --replace 'Exec=AppRun --no-sandbox %U' 'Exec=lunar-client' \
30 --replace 'Icon=launcher' 'Icon=lunar-client'
33 passthru.updateScript = ./update.sh;
36 description = "Free Minecraft client with mods, cosmetics, and performance boost.";
37 homepage = "https://www.lunarclient.com/";
38 license = with licenses; [ unfree ];
39 maintainers = with maintainers; [ zyansheep Technical27 surfaceflinger ];
40 platforms = [ "x86_64-linux" ];