3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/deltachat-electron/default.nix

41 lines
1.2 KiB
Nix
Raw Normal View History

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-18 20:37:05 +00:00
version = "1.15.3";
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-18 20:37:05 +00:00
sha256 = "sha256-cYb0uruuWpNr1jF5WZ48quBZRIVXiHr99mLPLKMOX5M=";
2020-03-12 09:36:17 +00:00
};
appimageContents = appimageTools.extract { inherit name src; };
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" ];
};
}