blob: a939685cda3b624c3ea4c542267086b955f2ab2a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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"
];
};
}
|