diff options
author | Franck Cuny <franck@fcuny.net> | 2024-12-21 10:40:38 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2024-12-21 10:40:38 -0800 |
commit | da2f05037163868a5fb09b96143719ab799b5f69 (patch) | |
tree | 4a117de23a8a42af66ef6767dbfe0e9b92877c20 /packages/sapi | |
parent | fix the configuration for aspell (diff) | |
download | world-da2f05037163868a5fb09b96143719ab799b5f69.tar.gz |
support multiple architectures for sapi
Diffstat (limited to '')
-rw-r--r-- | packages/sapi/default.nix | 28 |
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" + ]; }; } |