-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsui.nix
More file actions
32 lines (29 loc) · 1.11 KB
/
sui.nix
File metadata and controls
32 lines (29 loc) · 1.11 KB
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
{
stdenv,
pkgs,
}:
stdenv.mkDerivation rec {
name = "sui-cli-${version}";
version = "1.67.3"; # Update as needed. Should be a mainnet release version from https://github.com/MystenLabs/sui/releases
src = if stdenv.hostPlatform.isDarwin then
pkgs.fetchzip {
url = "https://github.com/MystenLabs/sui/releases/download/mainnet-v${version}/sui-mainnet-v${version}-macos-arm64.tgz"; # Assume is a M1 Mac
sha256 = "sha256-bnrLaWx7IWNoI0Ou9oQrfprBx/nKv282OGyrlUHcdFY="; # Should be replaced when bumping versions
stripRoot = false;
}
else if stdenv.isLinux then
pkgs.fetchzip {
url = "https://github.com/MystenLabs/sui/releases/download/mainnet-v${version}/sui-mainnet-v${version}-ubuntu-x86_64.tgz";
sha256 = "sha256-xAWUigROvAVVLIut/HlZJjx4MB7T1k0b6X5SGRIO+cw="; # Should be replaced when bumping versions
stripRoot = false;
}
else
builtins.throw "Unsupported system";
sourceRoot = ".";
# No build needed since we're using a prebuilt binary archive.
buildPhase = "true";
installPhase = ''
mkdir -p $out/bin
mv source/sui $out/bin/
'';
}