warp-terminal: Add Aarch64 support (#337811)

This commit is contained in:
Masum Reza 2024-08-28 12:53:48 +05:30 committed by GitHub
commit 34e5e14529
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 7 deletions

View File

@ -23,12 +23,17 @@ pname = "warp-terminal";
versions = lib.importJSON ./versions.json;
passthru.updateScript = ./update.sh;
linux_arch =
if stdenv.hostPlatform.system == "x86_64-linux"
then "x86_64"
else "aarch64";
linux = stdenv.mkDerivation (finalAttrs: {
inherit pname meta passthru;
inherit (versions.linux) version;
inherit (versions."linux_${linux_arch}") version;
src = fetchurl {
inherit (versions.linux) hash;
url = "https://releases.warp.dev/stable/v${finalAttrs.version}/warp-terminal-v${finalAttrs.version}-1-x86_64.pkg.tar.zst";
inherit (versions."linux_${linux_arch}") hash;
url = "https://releases.warp.dev/stable/v${finalAttrs.version}/warp-terminal-v${finalAttrs.version}-1-${linux_arch}.pkg.tar.zst";
};
sourceRoot = ".";
@ -100,7 +105,7 @@ meta = with lib; {
license = licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ emilytrau imadnyc donteatoreo johnrtitor ];
platforms = platforms.darwin ++ [ "x86_64-linux" ];
platforms = platforms.darwin ++ [ "x86_64-linux" "aarch64-linux" ];
};
in

View File

@ -27,10 +27,14 @@ resolve_url() {
pkg=macos
sfx=dmg
;;
linux)
linux_x86_64)
pkg=pacman
sfx=pkg.tar.zst
;;
linux_aarch64)
pkg=pacman_arm64
sfx=pkg.tar.zst
;;
*)
err "Unexpected download type: $1"
;;
@ -64,7 +68,8 @@ sri_get() {
}
for sys in darwin linux; do
for sys in darwin linux_x86_64 linux_aarch64; do
echo ${sys}
url=$(resolve_url ${sys})
version=$(get_version "${url}")
if [[ ${version} != "$(json_get ".${sys}.version")" ]]; then

View File

@ -3,8 +3,12 @@
"hash": "sha256-EDhj4Gb0ykFX8W2G8osusjggemcuHO7hkUKb151cQ6g=",
"version": "0.2024.08.20.08.02.stable_00"
},
"linux": {
"linux_x86_64": {
"hash": "sha256-Uk5pSoAvEppjLnskLc5/ftcCaiJnXATJfCPDP2QpBo8=",
"version": "0.2024.08.20.08.02.stable_00"
},
"linux_aarch64": {
"hash": "sha256-B0mUAwydIgi7Nhm/iUhEjkV3LL+qLfXZcOz6+7eDZGc=",
"version": "0.2024.08.20.08.02.stable_00"
}
}