♻️ 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,
makeDesktopItem,
}:
let
version = "2.3.5";
appimageTools.wrapType2 rec {
pname = "discord-music-presence";
version = "2.3.5";
src = fetchurl {
url = "https://github.com/ungive/discord-music-presence/releases/download/v${version}/musicpresence-${version}-linux-x86_64.AppImage";
hash = "sha256-M7oDxVevspA3SGuHktS8ChQAYopgIqypiVlzyE4uyqI=";
};
icon = fetchurl {
url = "https://raw.githubusercontent.com/music-presence/icons/refs/heads/master/dist/logo-app-circle.png";
hash = "sha256-ZQMN145GiTiFAYcVVSgaOLP3xSHokf3N0kFI+jf/2Zk=";
};
desktopItem = makeDesktopItem {
name = pname;
exec = pname;
icon = icon;
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";
extraInstallCommands =
let
contents = appimageTools.extract { inherit pname version src; };
in
''
install -m 444 -D ${contents}/musicpresence.desktop -t $out/share/applications
substituteInPlace $out/share/applications/musicpresence.desktop \
--replace-fail Exec=musicpresence Exec=$out/bin/${pname}
cp -r ${contents}/usr/share/icons $out/share
'';
meta = {