2023-02-17 01:46:04 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchzip
|
2018-08-05 18:03:55 +00:00
|
|
|
}:
|
2015-11-14 20:32:51 +00:00
|
|
|
|
2023-02-17 01:46:04 +00:00
|
|
|
let
|
|
|
|
os = if stdenv.hostPlatform.isDarwin then "macos" else "linux";
|
|
|
|
arch = if stdenv.hostPlatform.isAarch64 then "aarch64" else "x86_64";
|
|
|
|
platform = "${os}-${arch}";
|
|
|
|
in
|
2015-11-14 20:32:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "urbit";
|
2024-08-13 01:41:12 +00:00
|
|
|
version = "3.1";
|
2015-11-14 20:32:51 +00:00
|
|
|
|
2023-02-17 01:46:04 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/urbit/vere/releases/download/vere-v${version}/${platform}.tgz";
|
|
|
|
sha256 = {
|
2024-08-13 01:41:12 +00:00
|
|
|
x86_64-linux = "sha256-51Zgv9QANQVMk/dc7/heYmCNfeu4k7mrYNke1/oz/94=";
|
|
|
|
aarch64-linux = "sha256-Tdn/ve9iCjsY/b39TZ7ErHV14mIAHdtmycgUPIzRihQ=";
|
|
|
|
x86_64-darwin = "sha256-y/FQIVcEn6dLWXPztC34+7+5eDMO7Xcx25D2+0p7Mxk=";
|
|
|
|
aarch64-darwin = "sha256-YJGRZlpTdm1x4P+GnZiKC1411tcEX+Jdnm+iyxUlsU0=";
|
2023-02-17 01:46:04 +00:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
2015-11-14 20:32:51 +00:00
|
|
|
};
|
|
|
|
|
2023-02-17 01:46:04 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -m755 -D vere-v${version}-${platform} $out/bin/urbit
|
2018-07-19 06:27:22 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-17 01:46:04 +00:00
|
|
|
passthru.updateScript = ./update-bin.sh;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://urbit.org";
|
2023-02-17 01:46:04 +00:00
|
|
|
description = "Operating function";
|
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
|
|
|
maintainers = [ maintainers.matthew-levan ];
|
2015-11-14 20:32:51 +00:00
|
|
|
license = licenses.mit;
|
2023-05-15 14:45:00 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2023-11-23 21:09:35 +00:00
|
|
|
mainProgram = "urbit";
|
2015-11-14 20:32:51 +00:00
|
|
|
};
|
|
|
|
}
|