nixpkgs/pkgs/misc/urbit/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.2 KiB
Nix
Raw Normal View History

2023-02-17 01:46:04 +00:00
{ stdenv
, lib
, fetchzip
2018-08-05 18:03:55 +00:00
}:
2023-02-17 01:46:04 +00:00
let
os = if stdenv.isDarwin then "macos" else "linux";
arch = if stdenv.isAarch64 then "aarch64" else "x86_64";
platform = "${os}-${arch}";
in
stdenv.mkDerivation rec {
pname = "urbit";
2023-09-24 03:50:23 +00:00
version = "2.12";
2023-02-17 01:46:04 +00:00
src = fetchzip {
url = "https://github.com/urbit/vere/releases/download/vere-v${version}/${platform}.tgz";
sha256 = {
2023-09-24 03:50:23 +00:00
x86_64-linux = "sha256-N8RYlafw0HcmtGAQMKQb1cG7AivOpWS/5rU8CESJWAw=";
aarch64-linux = "sha256-RsBtwxSdqHVXMk7or1nPAFWd6Ypa0SqjpTihv8riyk4=";
x86_64-darwin = "sha256-/QPI66/gl3mlQHc+8zrEyP4/Hv5vwXlEx1cW2mP33IY=";
aarch64-darwin = "sha256-+2DYohaBxVcR1ZOjuk6GWcNpzb6aJMXq6BxwWw1OeIY=";
2023-02-17 01:46:04 +00:00
}.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
};
2023-02-17 01:46:04 +00:00
postInstall = ''
install -m755 -D vere-v${version}-${platform} $out/bin/urbit
'';
2023-02-17 01:46:04 +00:00
passthru.updateScript = ./update-bin.sh;
meta = with lib; {
homepage = "https://urbit.org";
2023-02-17 01:46:04 +00:00
description = "An operating function";
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
maintainers = [ maintainers.matthew-levan ];
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";
};
}