-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
49 lines (44 loc) · 1.57 KB
/
default.nix
File metadata and controls
49 lines (44 loc) · 1.57 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ pkgs ? import <nixpkgs> {} }:
let
os = if pkgs.stdenv.hostPlatform.isDarwin then "macos" else "linux";
arch = if pkgs.stdenv.hostPlatform.isAarch64 then "aarch64" else "x86_64";
platform = "${os}-${arch}";
in
pkgs.stdenv.mkDerivation rec {
pname = "urbit";
version = "4.0";
src = pkgs.fetchzip {
url = "https://github.com/urbit/vere/releases/download/vere-v${version}/${platform}.tgz";
sha256 =
{
#v3.5 Hash: x86_64-linux = "sha256-eB80GuyNuVZbBsyNnek8UCtquZbNt5G4Co7IKqq7aeI=";
x86_64-linux = "sha256-VgQHNxbcGDNapY0UO8ylfSUqyPlrKAH+Do9Sq8L2kXI=";
aarch64-linux = "0000000000000000000000000000000000000000000000000000";
x86_64-darwin = "0000000000000000000000000000000000000000000000000000";
aarch64-darwin = "0000000000000000000000000000000000000000000000000000";
}
.${pkgs.stdenv.hostPlatform.system} or (throw "unsupported system ${pkgs.stdenv.hostPlatform.system}");
};
installPhase = ''
install -m755 -D ./vere* $out/bin/urbit
'';
# Old postInstall Phase
#postInstall = ''
# install -m755 -D vere-v${version}-${platform} $out/bin/urbit
#'';
passthru.updateScript = ./update-bin.sh;
meta = with pkgs.lib; {
homepage = "https://urbit.org";
description = "A clean-slate OS and network for the 21st century.";
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
maintainers = [ maintainers.nixpup ];
license = licenses.mit;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
mainProgram = "urbit";
};
}