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
50
51
52
53
54
55
56
57
58
59
60
61
62
|
{ lib
, stdenv
, fetchFromGitHub
, cmake
, git
, pkg-config
, gperf
, libmicrohttpd
, libsodium
, lz4
, openssl
, readline
, secp256k1
, zlib
, nix-update-script
}:
stdenv.mkDerivation rec {
pname = "ton";
version = "2024.08";
src = fetchFromGitHub {
owner = "ton-blockchain";
repo = "ton";
rev = "v${version}";
hash = "sha256-OV/1//zIHebc3eLUxtUVV0TMuDdB25M7TT5y58x2Z68=";
fetchSubmodules = true;
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [
cmake
git
pkg-config
];
buildInputs = [
gperf
libmicrohttpd
libsodium
lz4
openssl
readline
secp256k1
zlib
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
# The build fails on darwin as:
# error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer
broken = stdenv.isDarwin;
description = "Fully decentralized layer-1 blockchain designed by Telegram";
homepage = "https://ton.org/";
changelog = "https://github.com/ton-blockchain/ton/blob/v${version}/Changelog.md";
license = licenses.lgpl2Only;
platforms = platforms.all;
maintainers = with maintainers; [ misuzu ];
};
}
|