Merge pull request #278137 from surfaceflinger/update-lunar
This commit is contained in:
commit
4e1402cbe8
2 changed files with 18 additions and 21 deletions
|
@ -4,27 +4,24 @@
|
|||
, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
appimageTools.wrapType2 rec {
|
||||
pname = "lunar-client";
|
||||
version = "3.1.3";
|
||||
version = "3.2.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launcherupdates.lunarclientcdn.com/Lunar%20Client-${version}.AppImage";
|
||||
hash = "sha512-VV6UH0mEv+bABljDKZUOZXBjM1Whf2uacUQI8AnyLDBYI7pH0fkdjsBfjhQhFL0p8nHOwPAQflA+8vRFLH/uZw==";
|
||||
hash = "sha512-ZW+SFIZ5+xxgesaZ7ZQbUnv7H5U92SZdfAU7GhJR1H0mhkrIb5Go6GWrIXaWYZLrmOlD98LSLihYi7SemJp+Yg==";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extract { inherit pname version src; };
|
||||
in
|
||||
appimageTools.wrapType2 rec {
|
||||
inherit pname version src;
|
||||
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/{${pname}-${version},${pname}}
|
||||
extraInstallCommands =
|
||||
let contents = appimageTools.extract { inherit pname version src; };
|
||||
in ''
|
||||
mv $out/bin/{lunar-client-*,lunar-client}
|
||||
source "${makeWrapper}/nix-support/setup-hook"
|
||||
wrapProgram $out/bin/${pname} \
|
||||
wrapProgram $out/bin/lunar-client \
|
||||
--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
|
||||
install -Dm444 ${contents}/launcher.desktop $out/share/applications/lunar-client.desktop
|
||||
install -Dm444 ${contents}/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'
|
||||
|
|
|
@ -6,7 +6,7 @@ target="$(dirname "$(readlink -f "$0")")/package.nix"
|
|||
host="https://launcherupdates.lunarclientcdn.com"
|
||||
metadata=$(curl "$host/latest-linux.yml")
|
||||
version=$(echo "$metadata" | yq .version -r)
|
||||
sha512=$(echo "$metadata" | yq .sha512 -r)
|
||||
hash=$(echo "$metadata" | yq .sha512 -r)
|
||||
|
||||
sed -i "s@version = .*;@version = \"$version\";@g" "$target"
|
||||
sed -i "s@hash.* = .*;@hash = \"sha512-$sha512\";@g" "$target"
|
||||
sed -i "s@hash.* = .*;@hash = \"sha512-$hash\";@g" "$target"
|
||||
|
|
Loading…
Reference in a new issue