diff options
author | nat <nat@nekopon.pl> | 2023-10-23 19:01:39 +0200 |
---|---|---|
committer | nat <nat@nekopon.pl> | 2023-10-23 19:01:39 +0200 |
commit | 03b2c6cec8709ca45fdbf248b7890a4a4c7380c3 (patch) | |
tree | d9d292d50e9c84cab67a05d6c6dad2017318d243 /pkgs/by-name | |
parent | a662970807f39915ced83824d5b40b3cb3a2ec8f (diff) | |
download | nixpkgs-03b2c6cec8709ca45fdbf248b7890a4a4c7380c3.tar nixpkgs-03b2c6cec8709ca45fdbf248b7890a4a4c7380c3.tar.gz nixpkgs-03b2c6cec8709ca45fdbf248b7890a4a4c7380c3.tar.bz2 nixpkgs-03b2c6cec8709ca45fdbf248b7890a4a4c7380c3.tar.lz nixpkgs-03b2c6cec8709ca45fdbf248b7890a4a4c7380c3.tar.xz nixpkgs-03b2c6cec8709ca45fdbf248b7890a4a4c7380c3.tar.zst nixpkgs-03b2c6cec8709ca45fdbf248b7890a4a4c7380c3.zip |
lunar-client: migrate to by-name
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/lu/lunar-client/package.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/by-name/lu/lunar-client/package.nix b/pkgs/by-name/lu/lunar-client/package.nix new file mode 100644 index 00000000000..042259fcfae --- /dev/null +++ b/pkgs/by-name/lu/lunar-client/package.nix @@ -0,0 +1,40 @@ +{ appimageTools +, fetchurl +, lib +, makeWrapper +}: + +let + pname = "lunar-client"; + version = "3.1.0"; + + src = fetchurl { + url = "https://launcherupdates.lunarclientcdn.com/Lunar%20Client-${version}.AppImage"; + hash = "sha256-6OAGNkMyHOZI5wh92OtalnvUVFWNAS9PvkFS0e4YXhk="; + }; + + 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; [ unfree ]; + maintainers = with maintainers; [ zyansheep Technical27 surfaceflinger ]; + platforms = [ "x86_64-linux" ]; + }; +} |