about summary refs log tree commit diff
path: root/packages/sapi
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sapi')
-rw-r--r--packages/sapi/default.nix28
1 files changed, 23 insertions, 5 deletions
diff --git a/packages/sapi/default.nix b/packages/sapi/default.nix
index 8a7adbd..a939685 100644
--- a/packages/sapi/default.nix
+++ b/packages/sapi/default.nix
@@ -4,13 +4,28 @@
   lib,
   ...
 }:
-
+let
+  version = "1.2.4";
+  sources = {
+    x86_64-darwin = {
+      url = "https://artifactory.rbx.com:443/artifactory/generic-rbx-local/sapi-cli/darwin-amd64/v${version}/sapi";
+      sha256 = "sha256-Il/aqGzxtI84TdUAz4Fvw8RbAgGBZQPN3MZrOitrpVk=";
+    };
+    aarch64-darwin = {
+      url = "https://artifactory.rbx.com:443/artifactory/generic-rbx-local/sapi-cli/darwin-arm64/v${version}/sapi";
+      sha256 = "sha256-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx="; # Replace with actual SHA
+    };
+  };
+in
 stdenv.mkDerivation rec {
   pname = "sapi";
-  version = "1.2.4";
+  inherit version;
+
   src = fetchurl {
-    url = "https://artifactory.rbx.com:443/artifactory/generic-rbx-local/sapi-cli/darwin-amd64/v${version}/sapi";
-    sha256 = "sha256-Il/aqGzxtI84TdUAz4Fvw8RbAgGBZQPN3MZrOitrpVk=";
+    inherit (sources.${stdenv.hostPlatform.system})
+      url
+      sha256
+      ;
   };
 
   installPhase = ''
@@ -26,6 +41,9 @@ stdenv.mkDerivation rec {
     description = "sapi command-line tool";
     homepage = "https://go/sapi";
     license = licenses.unfree;
-    platforms = [ "x86_64-darwin" ];
+    platforms = [
+      "x86_64-darwin"
+      "aarch64-darwin"
+    ];
   };
 }