depot/pkgs/by-name/si/simplex-chat-desktop/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

49 lines
1.5 KiB
Nix

{ lib
, appimageTools
, fetchurl
, gitUpdater
}:
let
pname = "simplex-chat-desktop";
version = "6.1.1";
src = fetchurl {
url = "https://github.com/simplex-chat/simplex-chat/releases/download/v${version}/simplex-desktop-x86_64.AppImage";
hash = "sha256-FHkZqbbJTQz+gIOgpMiak9u4ZOY/7r+1+if74LHLw/c=";
};
appimageContents = appimageTools.extract {
inherit pname version src;
};
in appimageTools.wrapType2 {
inherit pname version src;
extraBwrapArgs = [
"--setenv _JAVA_AWT_WM_NONREPARENTING 1"
];
extraInstallCommands = ''
install --mode=444 -D ${appimageContents}/chat.simplex.app.desktop --target-directory=$out/share/applications
substituteInPlace $out/share/applications/chat.simplex.app.desktop \
--replace-fail 'Exec=simplex' 'Exec=simplex-chat-desktop'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
passthru.updateScript = gitUpdater {
url = "https://github.com/simplex-chat/simplex-chat";
rev-prefix = "v";
# skip tags that does not correspond to official releases, like vX.Y.Z-(beta,fdroid,armv7a).
ignoredVersions = "-";
};
meta = with lib; {
description = "Desktop application for SimpleX Chat";
mainProgram = "simplex-chat-desktop";
homepage = "https://simplex.chat";
changelog = "https://github.com/simplex-chat/simplex-chat/releases/tag/v${version}";
license = licenses.agpl3Only;
maintainers = with maintainers; [ terryg ];
platforms = [ "x86_64-linux" ];
};
}