mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 15:44:20 +00:00
1e2662c5fd
pkgs.writeTextFile doesn't like spaces in filenames. This is fixed in #162246, but other tools will probably dislike spaces in .desktop file names as well, and that PR will take forever, so let's fix this anyway.
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ appimageTools, lib, fetchurl, makeDesktopItem }:
|
|
|
|
let
|
|
name = "lunar-client";
|
|
version = "2.9.3";
|
|
|
|
desktopItem = makeDesktopItem {
|
|
name = "lunar-client";
|
|
exec = "lunar-client";
|
|
icon = "lunarclient";
|
|
comment = "Minecraft 1.7, 1.8, 1.12, 1.15, and 1.16 Client";
|
|
desktopName = "Lunar Client";
|
|
genericName = "Minecraft Client";
|
|
categories = [ "Game" ];
|
|
};
|
|
|
|
appimageContents = appimageTools.extract {
|
|
inherit name src;
|
|
};
|
|
|
|
src = fetchurl {
|
|
url = "https://launcherupdates.lunarclientcdn.com/Lunar%20Client-${version}.AppImage";
|
|
name = "lunar-client.AppImage";
|
|
sha256 = "sha256-2wlC+OAG2lvUB3yPxppNhhvNDZv4gxrNKpww9vAfStI=";
|
|
};
|
|
in
|
|
appimageTools.wrapType1 rec {
|
|
inherit name src;
|
|
|
|
extraInstallCommands = ''
|
|
mkdir -p $out/share/applications
|
|
cp ${desktopItem}/share/applications/* $out/share/applications
|
|
cp -r ${appimageContents}/usr/share/icons/ $out/share/
|
|
'';
|
|
|
|
extraPkgs = pkgs: [ pkgs.libpulseaudio ];
|
|
|
|
meta = with lib; {
|
|
description = "Minecraft 1.7, 1.8, 1.12, 1.15, and 1.16 Client";
|
|
homepage = "https://www.lunarclient.com/";
|
|
license = with licenses; [ unfree ];
|
|
maintainers = with maintainers; [ zyansheep Technical27 ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|