7 os = if stdenv.hostPlatform.isDarwin then "macos" else "linux";
8 arch = if stdenv.hostPlatform.isAarch64 then "aarch64" else "x86_64";
9 platform = "${os}-${arch}";
11 stdenv.mkDerivation rec {
16 url = "https://github.com/urbit/vere/releases/download/vere-v${version}/${platform}.tgz";
18 x86_64-linux = "sha256-51Zgv9QANQVMk/dc7/heYmCNfeu4k7mrYNke1/oz/94=";
19 aarch64-linux = "sha256-Tdn/ve9iCjsY/b39TZ7ErHV14mIAHdtmycgUPIzRihQ=";
20 x86_64-darwin = "sha256-y/FQIVcEn6dLWXPztC34+7+5eDMO7Xcx25D2+0p7Mxk=";
21 aarch64-darwin = "sha256-YJGRZlpTdm1x4P+GnZiKC1411tcEX+Jdnm+iyxUlsU0=";
22 }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
26 install -m755 -D vere-v${version}-${platform} $out/bin/urbit
29 passthru.updateScript = ./update-bin.sh;
32 homepage = "https://urbit.org";
33 description = "Operating function";
34 platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
35 maintainers = [ maintainers.matthew-levan ];
36 license = licenses.mit;
37 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
38 mainProgram = "urbit";