♻️ different approach of unpackiging appImages

Signed-off-by: Xaiya Schumin <d.schumin@proton.me>
This commit is contained in:
Xaiya Schumin
2026-05-20 12:46:44 +02:00
parent c2ea7fd9a7
commit 9e2bf13d54
+11 -22
View File
@@ -5,35 +5,24 @@
appimageTools, appimageTools,
makeDesktopItem, makeDesktopItem,
}: }:
let appimageTools.wrapType2 rec {
version = "2.3.5";
pname = "discord-music-presence"; pname = "discord-music-presence";
version = "2.3.5";
src = fetchurl { src = fetchurl {
url = "https://github.com/ungive/discord-music-presence/releases/download/v${version}/musicpresence-${version}-linux-x86_64.AppImage"; url = "https://github.com/ungive/discord-music-presence/releases/download/v${version}/musicpresence-${version}-linux-x86_64.AppImage";
hash = "sha256-M7oDxVevspA3SGuHktS8ChQAYopgIqypiVlzyE4uyqI="; hash = "sha256-M7oDxVevspA3SGuHktS8ChQAYopgIqypiVlzyE4uyqI=";
}; };
icon = fetchurl { extraInstallCommands =
url = "https://raw.githubusercontent.com/music-presence/icons/refs/heads/master/dist/logo-app-circle.png"; let
hash = "sha256-ZQMN145GiTiFAYcVVSgaOLP3xSHokf3N0kFI+jf/2Zk="; contents = appimageTools.extract { inherit pname version src; };
}; in
''
desktopItem = makeDesktopItem { install -m 444 -D ${contents}/musicpresence.desktop -t $out/share/applications
name = pname; substituteInPlace $out/share/applications/musicpresence.desktop \
exec = pname; --replace-fail Exec=musicpresence Exec=$out/bin/${pname}
icon = icon; cp -r ${contents}/usr/share/icons $out/share
desktopName = pname;
genericName = "Discord Music Presence";
categories = [ "Application" ];
};
in
appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mkdir "$out/share";
ln -s "${desktopItem}/share/applications" "$out/share";
''; '';
meta = { meta = {