1 { lib, appimageTools, fetchurl, asar }: let
2 pname = "todoist-electron";
6 url = "https://electron-dl.todoist.com/linux/Todoist-linux-${version}-x86_64-latest.AppImage";
7 hash = "sha256-ZuoeeQ7SusRhr5BXBYEWCZ9pjdcWClKoR0mnom1XkPg=";
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: [ pkgs.hidapi ];
27 extraInstallCommands = ''
28 # Add desktop convencience stuff
29 install -Dm444 ${appimageContents}/todoist.desktop -t $out/share/applications
30 install -Dm444 ${appimageContents}/todoist.png -t $out/share/pixmaps
31 substituteInPlace $out/share/applications/todoist.desktop \
32 --replace 'Exec=AppRun' "Exec=$out/bin/${pname} --"
36 homepage = "https://todoist.com";
37 description = "Official Todoist electron app";
38 platforms = [ "x86_64-linux" ];
39 license = licenses.unfree;
40 maintainers = with maintainers; [ kylesferrazza pokon548 ];
41 mainProgram = "todoist-electron";