2023-11-16 04:20:00 +00:00
|
|
|
{ lib, appimageTools, fetchurl, asar }: let
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "todoist-electron";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "8.10.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-07-15 17:15:38 +00:00
|
|
|
url = "https://electron-dl.todoist.com/linux/Todoist-linux-x86_64-${version}.AppImage";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-Yp4wfibymHLGlaPDzu2rhSXxanwdXoNpF/d6+S0r+1U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
appimageContents = (appimageTools.extract { inherit pname version src; }).overrideAttrs (oA: {
|
|
|
|
buildCommand = ''
|
|
|
|
${oA.buildCommand}
|
|
|
|
|
|
|
|
# Get rid of the autoupdater
|
|
|
|
${asar}/bin/asar extract $out/resources/app.asar app
|
|
|
|
sed -i 's/async isUpdateAvailable.*/async isUpdateAvailable(updateInfo) { return false;/g' app/node_modules/electron-updater/out/AppUpdater.js
|
|
|
|
${asar}/bin/asar pack app $out/resources/app.asar
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
in appimageTools.wrapAppImage {
|
|
|
|
inherit pname version;
|
|
|
|
src = appimageContents;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
extraPkgs = pkgs: [ pkgs.hidapi ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
# Add desktop convencience stuff
|
|
|
|
install -Dm444 ${appimageContents}/todoist.desktop -t $out/share/applications
|
|
|
|
install -Dm444 ${appimageContents}/todoist.png -t $out/share/pixmaps
|
|
|
|
substituteInPlace $out/share/applications/todoist.desktop \
|
|
|
|
--replace 'Exec=AppRun' "Exec=$out/bin/${pname} --"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-02-19 19:06:45 +00:00
|
|
|
homepage = "https://todoist.com";
|
|
|
|
description = "The official Todoist electron app";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-02-19 19:06:45 +00:00
|
|
|
license = licenses.unfree;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ kylesferrazza pokon548 ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "todoist-electron";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|