Skip to content

Commit

Permalink
add lunar client
Browse files Browse the repository at this point in the history
  • Loading branch information
uku3lig committed Jan 1, 2024
1 parent 0cc793e commit 9eb1351
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
40 changes: 40 additions & 0 deletions exprs/lunar-client.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
appimageTools,
fetchurl,
lib,
makeWrapper,
}: let
pname = "lunar-client";
version = "3.2.0";

src = fetchurl {
url = "https://launcherupdates.lunarclientcdn.com/Lunar%20Client-${version}.AppImage";
hash = "sha256-Y9SjcVQ+7tmX6vKdYuD4JtTDJNmMKliEN5Yl41/WJjs=";
};

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

extraInstallCommands = ''
mv $out/bin/{${pname}-${version},${pname}}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -Dm444 ${appimageContents}/launcher.desktop $out/share/applications/lunar-client.desktop
install -Dm444 ${appimageContents}/launcher.png $out/share/pixmaps/lunar-client.png
substituteInPlace $out/share/applications/lunar-client.desktop \
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=lunar-client' \
--replace 'Icon=launcher' 'Icon=lunar-client'
'';

meta = with lib; {
description = "Free Minecraft client with mods, cosmetics, and performance boost.";
homepage = "https://www.lunarclient.com/";
license = with licenses; [mit]; # colon 3
mainProgram = "lunar-client";
maintainers = with maintainers; [zyansheep Technical27 surfaceflinger];
platforms = ["x86_64-linux"];
};
}
14 changes: 1 addition & 13 deletions exprs/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,5 @@ final: prev: {
meta.knownVulnerabilities = []; # NixOS/nixpkgs#273611
});

aseprite = prev.aseprite.overrideAttrs (old: rec {
version = "1.3.2";

src = prev.fetchFromGitHub {
owner = "aseprite";
repo = "aseprite";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-8PXqMDf2ATxmtFqyZlGip+DhGrdK8M6Ztte7fGH6Fmo=";
};

meta.license = prev.lib.licenses.mit; # removes unfree error
});
lunar-client = prev.callPackage ./lunar-client.nix {};
}
1 change: 1 addition & 0 deletions systems/desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ in {
gnome.gnome-calculator
jetbrains.idea-ultimate
libreoffice-fresh
lunar-client
mate.eom
mold
mpv
Expand Down

0 comments on commit 9eb1351

Please sign in to comment.