3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/mailreaders/electron-mail/default.nix

37 lines
1.1 KiB
Nix
Raw Normal View History

2021-09-01 18:48:01 +01:00
{ appimageTools, lib, fetchurl, libsecret }:
2021-06-09 23:46:17 +01:00
let
pname = "electron-mail";
2021-09-01 18:48:01 +01:00
version = "4.12.7";
2021-06-09 23:46:17 +01:00
name = "ElectronMail-${version}";
src = fetchurl {
url = "https://github.com/vladimiry/ElectronMail/releases/download/v${version}/electron-mail-${version}-linux-x86_64.AppImage";
2021-09-01 18:48:01 +01:00
sha256 = "42d0b49a2feba628f4845940ffd9607739bd5fcdbe6ba37e15f993c511d21e46";
2021-06-09 23:46:17 +01:00
};
appimageContents = appimageTools.extract { inherit name src; };
in appimageTools.wrapType2 {
inherit name src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
2021-09-01 18:48:01 +01:00
extraPkgs = pkgs: with pkgs; [
libsecret
];
2021-06-09 23:46:17 +01:00
meta = with lib; {
description = "ElectronMail is an Electron-based unofficial desktop client for ProtonMail";
homepage = "https://github.com/vladimiry/ElectronMail";
license = licenses.mit;
maintainers = [ maintainers.princemachiavelli ];
platforms = [ "x86_64-linux" ];
};
}