depot/pkgs/applications/networking/mailreaders/tutanota-desktop/default.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

44 lines
1.4 KiB
Nix

{ lib
, appimageTools
, fetchurl
, gitUpdater
}:
appimageTools.wrapType2 rec {
pname = "tutanota-desktop";
version = "250.241025.0";
src = fetchurl {
url = "https://github.com/tutao/tutanota/releases/download/tutanota-desktop-release-${version}/tutanota-desktop-linux.AppImage";
hash = "sha256-PhcrDjqRmR1NVBLVCuj5dcc+WskWeZ9dJXdtOUveyL0=";
};
extraPkgs = pkgs: [ pkgs.libsecret ];
extraInstallCommands =
let appimageContents = appimageTools.extract { inherit pname version src; };
in ''
install -Dm 444 ${appimageContents}/tutanota-desktop.desktop -t $out/share/applications
install -Dm 444 ${appimageContents}/tutanota-desktop.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/tutanota-desktop.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
passthru.updateScript = gitUpdater {
url = "https://github.com/tutao/tutanota";
rev-prefix = "tutanota-desktop-release-";
allowedVersions = ".+\\.[0-9]{6}\\..+";
};
meta = with lib; {
description = "Tuta official desktop client";
homepage = "https://tuta.com/";
changelog = "https://github.com/tutao/tutanota/releases/tag/tutanota-desktop-release-${version}";
license = licenses.gpl3Only;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = [ ];
mainProgram = "tutanota-desktop";
platforms = [ "x86_64-linux" ];
};
}