todoist-electron: 9.18.0 -> 9.20.0

This commit is contained in:
Bu Kun
2025-10-27 14:36:25 +08:00
parent e8d0f95057
commit 4b30ce9cf6
3 changed files with 53 additions and 7 deletions
+9 -7
View File
@@ -1,5 +1,6 @@
{
lib,
stdenv,
appimageTools,
fetchurl,
asar,
@@ -7,13 +8,14 @@
}:
let
pname = "todoist-electron";
version = "9.18.0";
sources = import ./sources.nix;
src = fetchurl {
url = "https://electron-dl.todoist.net/linux/Todoist-linux-${version}-x86_64-latest.AppImage";
hash = "sha256-2X//beSpQ1rCqU4Wn5ELoxgfi2knFAJ2w1rn41TNP6g=";
};
pname = "todoist-electron";
version = sources.version;
src =
fetchurl
sources.${stdenv.hostPlatform.system}
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
appimageContents = appimageTools.extract {
inherit pname version src;
@@ -54,6 +56,6 @@ appimageTools.wrapAppImage {
kylesferrazza
pokon548
];
platforms = [ "x86_64-linux" ];
platforms = lib.attrNames sources;
};
}
@@ -0,0 +1,13 @@
# Generated by ./update.sh - do not update manually!
# Last updated: 2025-09-25
{
version = "9.20.0";
x86_64-linux = {
url = "https://electron-dl.todoist.net/linux/Todoist-linux-9.20.0-x86_64-latest.AppImage";
hash = "sha256-Rpn7cobgYQt06d+t5XDYUZTOc/pnpRJIEXZeDAiJIH8=";
};
aarch64-linux = {
url = "https://electron-dl.todoist.net/linux/Todoist-linux-9.20.0-arm64-latest.AppImage";
hash = "sha256-0oyJXgu7BYjnKak3Gxo8XtI0kmGvPvAfNAB4fRnZsoE=";
};
}
@@ -0,0 +1,31 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash --pure --keep GITHUB_TOKEN -p nix git curl cacert nix-prefetch-git gnugrep
base_url=$(curl -Ls -o /dev/null -w %{url_effective} https://todoist.com/linux_app/appimage)
version=$(echo $base_url | grep -oP '(?<=Todoist-linux-)(\d+\.\d+\.\d+)')
url=()
hash=()
for i in x86_64 arm64
do
current_url=$(echo $base_url | sed "s/x86_64/$i/")
url+=($current_url)
hash+=("$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $(nix-prefetch-url $current_url))")
done
cat >sources.nix <<EOF
# Generated by ./update.sh - do not update manually!
# Last updated: $(date +%F)
{
version = "$version";
x86_64-linux = {
url = "${url[0]}";
hash = "${hash[0]}";
};
aarch64-linux = {
url = "${url[1]}";
hash = "${hash[1]}";
};
}
EOF