nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 45 lines 1.3 kB view raw
1{ 2 appimageTools, 3 lib, 4 fetchurl, 5 nix-update-script, 6}: 7 8let 9 pname = "electron-mail"; 10 version = "5.3.0"; 11 12 src = fetchurl { 13 url = "https://github.com/vladimiry/ElectronMail/releases/download/v${version}/electron-mail-${version}-linux-x86_64.AppImage"; 14 hash = "sha256-QGYsD8Ec6/G4X2dGZfH7LwT6o6X599kP6V34y6WxP64="; 15 }; 16 17 appimageContents = appimageTools.extract { inherit pname version src; }; 18in 19appimageTools.wrapType2 { 20 inherit pname version src; 21 22 extraInstallCommands = '' 23 install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications 24 substituteInPlace $out/share/applications/${pname}.desktop \ 25 --replace 'Exec=AppRun' 'Exec=${pname}' 26 cp -r ${appimageContents}/usr/share/icons $out/share 27 ''; 28 29 extraPkgs = pkgs: [ 30 pkgs.libsecret 31 pkgs.libappindicator-gtk3 32 ]; 33 34 passthru.updateScript = nix-update-script { }; 35 36 meta = { 37 description = "ElectronMail is an Electron-based unofficial desktop client for ProtonMail"; 38 mainProgram = "electron-mail"; 39 homepage = "https://github.com/vladimiry/ElectronMail"; 40 license = lib.licenses.gpl3; 41 maintainers = [ lib.maintainers.princemachiavelli ]; 42 platforms = [ "x86_64-linux" ]; 43 changelog = "https://github.com/vladimiry/ElectronMail/releases/tag/v${version}"; 44 }; 45}