orbstack: drop x86_64-darwin from update script

This commit is contained in:
Emily
2026-07-15 03:58:17 +01:00
parent 6eacc88f2a
commit 3336a0bce7
2 changed files with 10 additions and 35 deletions
+6 -18
View File
@@ -8,28 +8,17 @@
let
inherit (stdenvNoCC.hostPlatform) system;
version = "2.2.1-20628";
sourceData = {
aarch64-darwin = {
arch = "arm64";
hash = "sha256-W8FxnDyYfExgxlvp/dZbRzCZDhaX7Byxwz5rujG/krU=";
};
};
sources = lib.mapAttrs (
system:
{ arch, hash }:
fetchurl {
url = "https://cdn-updates.orbstack.dev/${arch}/OrbStack_v${
lib.replaceString "-" "_" version
}_${arch}.dmg";
inherit hash;
}
) sourceData;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "orbstack";
inherit version;
src = finalAttrs.passthru.sources.${system} or (throw "unsupported system ${system}");
src = fetchurl {
url = "https://cdn-updates.orbstack.dev/arm64/OrbStack_v${
lib.replaceString "-" "_" version
}_arm64.dmg";
hash = "sha256-W8FxnDyYfExgxlvp/dZbRzCZDhaX7Byxwz5rujG/krU=";
};
# -snld prevents "ERROR: Dangerous symbolic link path was ignored"
# -xr'!*:com.apple.*' prevents macOS extended attributes (e.g. macl or
@@ -66,7 +55,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
'';
passthru = {
inherit sources;
updateScript = ./update.sh;
};
+4 -17
View File
@@ -4,21 +4,8 @@
set -eu -o pipefail
update_arch() {
local arch="$1"
local system="$2"
source_url="$(curl -L -I "https://orbstack.dev/download/stable/latest/arm64" | grep -i "location:" | awk '{print $2}' | tr -d '\r')"
version="$(echo "$source_url" | grep -o '\([0-9]\+\.\)\{2\}[0-9]\+_[0-9]\+' | sed 's/_/-/')"
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$(nix-prefetch-url --type sha256 "$source_url")")
local source_url
source_url="$(curl -L -I "https://orbstack.dev/download/stable/latest/$arch" | grep -i "location:" | awk '{print $2}' | tr -d '\r')"
local version
version="$(echo "$source_url" | grep -o '\([0-9]\+\.\)\{2\}[0-9]\+_[0-9]\+' | sed 's/_/-/')"
local hash
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$(nix-prefetch-url --type sha256 "$source_url")")
update-source-version orbstack "$version" "$hash" --system="$system" --source-key="sources.$system" --ignore-same-version
}
update_arch "arm64" "aarch64-darwin"
update_arch "amd64" "x86_64-darwin"
update-source-version orbstack "$version" "$hash" --ignore-same-version