nixpkgs/pkgs/misc/urbit/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

41 lines
1.2 KiB
Nix

{ stdenv
, lib
, fetchzip
}:
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";
version = "3.0";
src = fetchzip {
url = "https://github.com/urbit/vere/releases/download/vere-v${version}/${platform}.tgz";
sha256 = {
x86_64-linux = "sha256-ip35d9YgwFEkNb+1h+8WYBgUm+QlckvHhlAT69TpeYg=";
aarch64-linux = "sha256-3TkK9YyFtEMpRjG/iKvxctD8pYRh0bWgH+3QWh++r5U=";
x86_64-darwin = "sha256-bvDZBSQmsXmJA2ZekWPr6krB0KzCFFly8KUqT5mVK1A=";
aarch64-darwin = "sha256-UybuCXpE/xwg4YmR3rpZiFTs1KQYAttpEjF/Fz+UD00=";
}.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
};
postInstall = ''
install -m755 -D vere-v${version}-${platform} $out/bin/urbit
'';
passthru.updateScript = ./update-bin.sh;
meta = with lib; {
homepage = "https://urbit.org";
description = "Operating function";
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
maintainers = [ maintainers.matthew-levan ];
license = licenses.mit;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
mainProgram = "urbit";
};
}