Skip to content

Commit

Permalink
feat(todoist): fork-update to 8.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
workflow committed Oct 29, 2023
1 parent 6df1118 commit 0c3a0a0
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ let

confluent-cli = pkgs.callPackage ./confluent-cli { };

todoist-electron = pkgs.callPackage ./todoist-electron { };

packages =
[
pkgs.android-studio
Expand Down Expand Up @@ -174,7 +176,7 @@ let
nixpkgs-unstable.tdesktop # Telegram
pkgs.thefuck
pkgs.tldr
pkgs.todoist-electron
todoist-electron
pkgs.traceroute
pkgs.trash-cli
pkgs.tree
Expand Down
52 changes: 52 additions & 0 deletions packages/todoist-electron/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron_25, libsecret }:

stdenv.mkDerivation rec {
pname = "todoist-electron";
version = "8.9.3";

src = fetchurl {
url = "https://electron-dl.todoist.com/linux/Todoist-linux-x86_64-${version}.AppImage";
hash = "sha256-L1uH5bnJ66QxAXs7yywG4H/FaunwTX1l+tVtRe2nxdc=";
};

appimageContents = appimageTools.extractType2 {
name = "${pname}-${version}";
inherit src;
};

dontUnpack = true;
dontConfigure = true;
dontBuild = true;

nativeBuildInputs = [ makeWrapper ];

installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/${pname} $out/share/applications $out/share/icons/hicolor/512x512
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/todoist.desktop $out/share/applications/${pname}.desktop
cp -a ${appimageContents}/usr/share/icons/hicolor/512x512/apps $out/share/icons/hicolor/512x512
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
runHook postInstall
'';

postFixup = ''
makeWrapper ${electron_25}/bin/electron $out/bin/todoist-electron \
--add-flags $out/share/${pname}/resources/app.asar \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc libsecret ]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
'';

meta = with lib; {
homepage = "https://todoist.com";
description = "The official Todoist electron app";
platforms = [ "x86_64-linux" ];
license = licenses.unfree;
maintainers = with maintainers; [ i077 kylesferrazza ];
};
}

0 comments on commit 0c3a0a0

Please sign in to comment.