2021-02-22 21:33:17 +00:00
|
|
|
{ lib, fetchurl, appimageTools, gsettings-desktop-schemas, gtk3 }:
|
|
|
|
|
2020-03-12 09:36:17 +00:00
|
|
|
let
|
|
|
|
pname = "deltachat-electron";
|
2021-03-06 11:04:23 +00:00
|
|
|
version = "1.15.2";
|
2020-03-12 09:36:17 +00:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-03-06 18:21:19 +00:00
|
|
|
url = "https://download.delta.chat/desktop/v${version}/DeltaChat-${version}.AppImage";
|
2021-03-06 11:04:23 +00:00
|
|
|
sha256 = "sha256-iw2tU8qqXWbtEdLGlW8HNBHx8F2CgnCGCBUWpM407us=";
|
2020-03-12 09:36:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
appimageContents = appimageTools.extract { inherit name src; };
|
|
|
|
|
2021-02-20 00:05:28 +00:00
|
|
|
in
|
|
|
|
appimageTools.wrapType2 {
|
2020-03-12 09:36:17 +00:00
|
|
|
inherit name src;
|
|
|
|
|
2021-02-22 21:33:17 +00:00
|
|
|
profile = ''
|
|
|
|
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
|
|
|
|
'';
|
|
|
|
|
2020-03-12 09:36:17 +00:00
|
|
|
extraInstallCommands = ''
|
|
|
|
mv $out/bin/${name} $out/bin/${pname}
|
|
|
|
install -m 444 -D \
|
|
|
|
${appimageContents}/deltachat-desktop.desktop \
|
|
|
|
$out/share/applications/${pname}.desktop
|
|
|
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
|
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
|
|
|
cp -r ${appimageContents}/usr/share/icons $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Electron client for DeltaChat";
|
|
|
|
homepage = "https://delta.chat/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ ehmry ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|