aboutsummaryrefslogtreecommitdiff
path: root/pkgs/sapi/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/sapi/default.nix')
-rw-r--r--pkgs/sapi/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/sapi/default.nix b/pkgs/sapi/default.nix
new file mode 100644
index 0000000..a939685
--- /dev/null
+++ b/pkgs/sapi/default.nix
@@ -0,0 +1,49 @@
+{
+ stdenv,
+ fetchurl,
+ 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";
+ inherit version;
+
+ src = fetchurl {
+ inherit (sources.${stdenv.hostPlatform.system})
+ url
+ sha256
+ ;
+ };
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp $src $out/bin/sapi
+ chmod +x $out/bin/sapi
+ '';
+
+ dontUnpack = true;
+ dontStrip = true;
+
+ meta = with lib; {
+ description = "sapi command-line tool";
+ homepage = "https://go/sapi";
+ license = licenses.unfree;
+ platforms = [
+ "x86_64-darwin"
+ "aarch64-darwin"
+ ];
+ };
+}