feat(loop): extract desktop file and icons from AppImage
Some checks failed
CI / check (push) Has been cancelled
Some checks failed
CI / check (push) Has been cancelled
- Use appimageTools.extractType2 to access embedded assets - Install loop-desktop.desktop and rewrite Exec=AppRun → Exec=loop - Copy hicolor icons (16–1024px) from AppImage tree
This commit is contained in:
@@ -6,22 +6,35 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
version = "6.0.3";
|
version = "6.0.3";
|
||||||
in
|
|
||||||
|
|
||||||
appimageTools.wrapType2 {
|
|
||||||
pname = "loop";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://artifacts.wilix.dev/repository/loop-files/loop-${version}/loop-desktop-${version}-linux-x86_64.AppImage";
|
url = "https://artifacts.wilix.dev/repository/loop-files/loop-${version}/loop-desktop-${version}-linux-x86_64.AppImage";
|
||||||
hash = "sha256-zGWKlY6XwuL0e2mDpB/1t0UnW73bhCPcg6XkBJBCEFY=";
|
hash = "sha256-zGWKlY6XwuL0e2mDpB/1t0UnW73bhCPcg6XkBJBCEFY=";
|
||||||
};
|
};
|
||||||
|
appimageContents = appimageTools.extractType2 {
|
||||||
|
pname = "loop";
|
||||||
|
inherit version src;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
appimageTools.wrapType2 {
|
||||||
|
pname = "loop";
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
extraPkgs = pkgsWith: [
|
extraPkgs = pkgsWith: [
|
||||||
pkgsWith.gtk3
|
pkgsWith.gtk3
|
||||||
pkgsWith.glib
|
pkgsWith.glib
|
||||||
];
|
];
|
||||||
|
|
||||||
|
extraInstallCommands = ''
|
||||||
|
mkdir -p $out/share/applications
|
||||||
|
install -m 444 ${appimageContents}/loop-desktop.desktop $out/share/applications/loop.desktop
|
||||||
|
substituteInPlace $out/share/applications/loop.desktop \
|
||||||
|
--replace-fail 'Exec=AppRun %U' 'Exec=loop %U'
|
||||||
|
|
||||||
|
mkdir -p $out/share/icons/hicolor
|
||||||
|
cp -r ${appimageContents}/usr/share/icons/hicolor/* $out/share/icons/hicolor/
|
||||||
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
category = "Communication";
|
category = "Communication";
|
||||||
updateScript = [
|
updateScript = [
|
||||||
@@ -31,13 +44,13 @@ appimageTools.wrapType2 {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Corporate messenger for your team";
|
description = "Corporate messenger for your team";
|
||||||
homepage = "https://loop.ru";
|
homepage = "https://loop.ru";
|
||||||
license = licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = [ ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
mainProgram = "loop";
|
mainProgram = "loop";
|
||||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user