1 { lib, stdenv, fetchurl, appimageTools, makeWrapper, electron_15, libsecret }:
3 stdenv.mkDerivation rec {
4 pname = "todoist-electron";
8 url = "https://electron-dl.todoist.com/linux/Todoist-${version}.AppImage";
9 sha256 = "sha256-bHX/RWDfe+ht66U7xg4HBZxeWlNBu4gYlIVd+9OuMNU=";
12 appimageContents = appimageTools.extractType2 {
13 name = "${pname}-${version}";
21 nativeBuildInputs = [ makeWrapper ];
26 mkdir -p $out/bin $out/share/${pname} $out/share/applications $out/share/icons/hicolor/512x512
28 cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
29 cp -a ${appimageContents}/todoist.desktop $out/share/applications/${pname}.desktop
30 cp -a ${appimageContents}/usr/share/icons/hicolor/512x512/apps $out/share/icons/hicolor/512x512
32 substituteInPlace $out/share/applications/${pname}.desktop \
33 --replace 'Exec=AppRun' 'Exec=${pname}'
39 makeWrapper ${electron_15}/bin/electron $out/bin/${pname} \
40 --add-flags $out/share/${pname}/resources/app.asar \
41 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc libsecret ]}"
45 homepage = "https://todoist.com";
46 description = "The official Todoist electron app";
47 platforms = [ "x86_64-linux" ];
48 license = licenses.unfree;
49 maintainers = with maintainers; [ i077 kylesferrazza ];