simplex-chat-desktop: fix updates for aarch64-linux (#518068)
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
appimageTools,
|
||||
fetchurl,
|
||||
gitUpdater,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
@@ -13,7 +12,7 @@ let
|
||||
sources = {
|
||||
"aarch64-linux" = fetchurl {
|
||||
url = "https://github.com/simplex-chat/simplex-chat/releases/download/v${version}/simplex-desktop-aarch64.AppImage";
|
||||
hash = "sha256-CvHwYKbieRYbBKUCoKAa11rTy5Opdfb7FKS4poantKs=";
|
||||
hash = "sha256-VrPNKXgVO/9yvGqseOVkYKMFVqhtExL2PCJb6stn3ko=";
|
||||
};
|
||||
"x86_64-linux" = fetchurl {
|
||||
url = "https://github.com/simplex-chat/simplex-chat/releases/download/v${version}/simplex-desktop-x86_64.AppImage";
|
||||
@@ -46,11 +45,9 @@ appimageTools.wrapType2 {
|
||||
cp -r ${appimageContents}/usr/share/icons $out/share
|
||||
'';
|
||||
|
||||
passthru.updateScript = gitUpdater {
|
||||
url = "https://github.com/simplex-chat/simplex-chat";
|
||||
rev-prefix = "v";
|
||||
# skip tags that does not correspond to official releases, like vX.Y.Z-(beta,fdroid,armv7a).
|
||||
ignoredVersions = "-";
|
||||
passthru = {
|
||||
inherit sources;
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
attr="simplex-chat-desktop"
|
||||
|
||||
# Get the latest non-prerelease tag from GitHub.
|
||||
latest=$(curl -fsSL ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} \
|
||||
"https://api.github.com/repos/simplex-chat/simplex-chat/releases/latest" \
|
||||
| jq -r '.tag_name')
|
||||
|
||||
# Strip the leading "v".
|
||||
version="${latest#v}"
|
||||
|
||||
# Current version in nixpkgs (so we can short-circuit if unchanged).
|
||||
current=$(nix-instantiate --eval -E "with import ./. {}; ${attr}.version" \
|
||||
| tr -d '"')
|
||||
|
||||
if [[ "$version" == "$current" ]]; then
|
||||
echo "${attr} is already at ${version}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Update each per-system source independently.
|
||||
update-source-version "$attr" "$version" \
|
||||
--source-key=sources.x86_64-linux
|
||||
|
||||
# --ignore-same-version flag silences warning because previous invocation bumped version
|
||||
update-source-version "$attr" "$version" \
|
||||
--ignore-same-version \
|
||||
--source-key=sources.aarch64-linux
|
||||
Reference in New Issue
Block a user