Skip to content

Commit 04d2b75

Browse files
committed
appwrite-cli: init at 15.0.0
Signed-off-by: Mike Nguyen <hey@mike.ee>
1 parent 5e8a0b8 commit 04d2b75

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
lib,
3+
stdenvNoCC,
4+
fetchurl,
5+
}:
6+
7+
let
8+
pname = "appwrite-cli";
9+
version = "15.0.0";
10+
11+
systemMap = {
12+
x86_64-linux = "linux-x64";
13+
aarch64-linux = "linux-arm64";
14+
x86_64-darwin = "darwin-x64";
15+
aarch64-darwin = "darwin-arm64";
16+
};
17+
18+
hashMap = {
19+
x86_64-linux = "sha256-MX408tPAd1cZwak9/kaMCdfXH+dE4owbSEw/L/E75Dk=";
20+
aarch64-linux = "sha256-katuoi1DKIITkhs9/fj9p8o3uEZW5w2OjnK9VwRdIrU=";
21+
x86_64-darwin = "sha256-Nohy2lALsH/mNPVMtEZ4MDYTdF3P47k/CWAN6suaxOI=";
22+
aarch64-darwin = "sha256-N1yGwDRR/9X40T/QzQ1rPqbVXnk9bp6NmBtcdDdhKb8=";
23+
};
24+
in
25+
stdenvNoCC.mkDerivation {
26+
inherit pname version;
27+
28+
src = fetchurl {
29+
url = "https://github.com/appwrite/sdk-for-cli/releases/download/${version}/appwrite-cli-${systemMap.${stdenvNoCC.hostPlatform.system}}";
30+
hash = hashMap.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}");
31+
};
32+
33+
dontUnpack = true;
34+
35+
installPhase = ''
36+
runHook preInstall
37+
install -Dm755 $src $out/bin/appwrite
38+
runHook postInstall
39+
'';
40+
41+
meta = {
42+
description = "The Official Appwrite CLI";
43+
homepage = "https://appwrite.io";
44+
changelog = "https://github.com/appwrite/sdk-for-cli/releases/tag/${version}";
45+
license = lib.licenses.bsd3;
46+
mainProgram = "appwrite";
47+
maintainers = with lib.maintainers; [ mikeee ];
48+
platforms = lib.attrNames systemMap;
49+
};
50+
}

0 commit comments

Comments
 (0)