1 { lib, appimageTools, fetchurl, asar }: let
2 pname = "todoist-electron";
6 url = "https://electron-dl.todoist.com/linux/Todoist-linux-x86_64-${version}.AppImage";
7 hash = "sha256-Yp4wfibymHLGlaPDzu2rhSXxanwdXoNpF/d6+S0r+1U=";
10 appimageContents = (appimageTools.extract { inherit pname version src; }).overrideAttrs (oA: {
14 # Get rid of the autoupdater
15 ${asar}/bin/asar extract $out/resources/app.asar app
16 sed -i 's/async isUpdateAvailable.*/async isUpdateAvailable(updateInfo) { return false;/g' app/node_modules/electron-updater/out/AppUpdater.js
17 ${asar}/bin/asar pack app $out/resources/app.asar
21 in appimageTools.wrapAppImage {
22 inherit pname version;
23 src = appimageContents;
25 extraPkgs = { pkgs, ... }@args: [
27 ] ++ appimageTools.defaultFhsEnvArgs.multiPkgs args;
29 extraInstallCommands = ''
30 # Add desktop convencience stuff
31 mv $out/bin/{${pname}-*,${pname}}
32 install -Dm444 ${appimageContents}/todoist.desktop -t $out/share/applications
33 install -Dm444 ${appimageContents}/todoist.png -t $out/share/pixmaps
34 substituteInPlace $out/share/applications/todoist.desktop \
35 --replace 'Exec=AppRun' "Exec=$out/bin/${pname} --"
39 homepage = "https://todoist.com";
40 description = "The official Todoist electron app";
41 platforms = [ "x86_64-linux" ];
42 license = licenses.unfree;
43 maintainers = with maintainers; [ kylesferrazza pokon548 ];
44 mainProgram = "todoist-electron";