From 10daf4a44840391d11f505ba4eb613447ee9bed8 Mon Sep 17 00:00:00 2001 From: Victor Batarse Date: Sat, 13 Jun 2026 13:45:17 +0200 Subject: [PATCH] fix: host detection when using nix --- lib/quack_db/binary.ex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/quack_db/binary.ex b/lib/quack_db/binary.ex index fdc5c62..2381a8b 100644 --- a/lib/quack_db/binary.ex +++ b/lib/quack_db/binary.ex @@ -228,10 +228,13 @@ defmodule QuackDB.Binary do arch = :erlang.system_info(:system_architecture) |> List.to_string() cond do - os == {:unix, :darwin} and arch in ["aarch64-apple-darwin", "arm64-apple-darwin"] -> + os == {:unix, :darwin} and String.starts_with?(arch, "aarch64-apple-darwin") -> {:ok, "osx-arm64"} - os == {:unix, :darwin} and arch == "x86_64-apple-darwin" -> + os == {:unix, :darwin} and String.starts_with?(arch, "arm64-apple-darwin") -> + {:ok, "osx-arm64"} + + os == {:unix, :darwin} and String.starts_with?(arch, "x86_64-apple-darwin") -> {:ok, "osx-amd64"} match?({:unix, _}, os) and String.starts_with?(arch, "x86_64") ->