♻️ different approach of unpackiging appImages
Signed-off-by: Xaiya Schumin <d.schumin@proton.me>
This commit is contained in:
@@ -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; };
|
||||||
};
|
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
|
||||||
name = pname;
|
|
||||||
exec = pname;
|
|
||||||
icon = icon;
|
|
||||||
desktopName = pname;
|
|
||||||
genericName = "Discord Music Presence";
|
|
||||||
categories = [ "Application" ];
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
appimageTools.wrapType2 rec {
|
''
|
||||||
inherit pname version src;
|
install -m 444 -D ${contents}/musicpresence.desktop -t $out/share/applications
|
||||||
|
substituteInPlace $out/share/applications/musicpresence.desktop \
|
||||||
extraInstallCommands = ''
|
--replace-fail Exec=musicpresence Exec=$out/bin/${pname}
|
||||||
mkdir "$out/share";
|
cp -r ${contents}/usr/share/icons $out/share
|
||||||
ln -s "${desktopItem}/share/applications" "$out/share";
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|||||||
Reference in New Issue
Block a user