todoist-electron: 0.2.4 -> 1.0.1

This commit is contained in:
Imran Hossain 2021-08-26 13:41:29 -04:00
parent 55f48acce6
commit fde652fb6c

View File

@ -1,12 +1,12 @@
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron_11, libsecret }:
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron, libsecret }:
stdenv.mkDerivation rec {
pname = "todoist-electron";
version = "0.2.4";
version = "1.0.1";
src = fetchurl {
url = "https://electron-dl.todoist.com/linux/Todoist-${version}.AppImage";
sha256 = "1xrf2qjhq116z18qx7n1zd7mhvkb2dccaq7az4w6fs216l8q5zf2";
sha256 = "1c4qmfyfi4hm3fs5bkxjbq1hxs5sgyp531xi5z5vpnzzi5z7dw0k";
};
appimageContents = appimageTools.extractType2 {
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
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/0x0/apps $out/share/icons/hicolor/512x512
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}'
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
'';
postFixup = ''
makeWrapper ${electron_11}/bin/electron $out/bin/${pname} \
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/resources/app.asar \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc libsecret ]}"
'';