mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
f8c4a98e8e
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"([Tt]he)? ' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Tt]he (.)/\1\U\2/'
44 lines
1.5 KiB
Nix
44 lines
1.5 KiB
Nix
{ lib, appimageTools, fetchurl, asar }: let
|
|
pname = "todoist-electron";
|
|
version = "8.10.1";
|
|
|
|
src = fetchurl {
|
|
url = "https://electron-dl.todoist.com/linux/Todoist-linux-x86_64-${version}.AppImage";
|
|
hash = "sha256-Yp4wfibymHLGlaPDzu2rhSXxanwdXoNpF/d6+S0r+1U=";
|
|
};
|
|
|
|
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;
|
|
|
|
extraPkgs = pkgs: [ pkgs.hidapi ];
|
|
|
|
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} --"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://todoist.com";
|
|
description = "Official Todoist electron app";
|
|
platforms = [ "x86_64-linux" ];
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ kylesferrazza pokon548 ];
|
|
mainProgram = "todoist-electron";
|
|
};
|
|
}
|