1{ lib
2, stdenv
3, fetchFromGitHub
4, cmake
5, git
6, pkg-config
7, gperf
8, libmicrohttpd
9, openssl
10, readline
11, zlib
12}:
13
14stdenv.mkDerivation rec {
15 pname = "ton";
16 version = "2023.05";
17
18 src = fetchFromGitHub {
19 owner = "ton-blockchain";
20 repo = "ton";
21 rev = "v${version}";
22 sha256 = "sha256-EuFKoqOzKoaBCiVAsb8K053kAL4bw1WqmmybVJX2Fmo=";
23 fetchSubmodules = true;
24 };
25
26 outputs = [ "out" "dev" ];
27
28 nativeBuildInputs = [
29 cmake
30 git
31 pkg-config
32 ];
33
34 buildInputs = [
35 gperf
36 libmicrohttpd
37 openssl
38 readline
39 zlib
40 ];
41
42 meta = with lib; {
43 description = "A fully decentralized layer-1 blockchain designed by Telegram";
44 homepage = "https://ton.org/";
45 changelog = "https://github.com/ton-blockchain/ton/blob/v${version}/Changelog.md";
46 license = licenses.lgpl2Only;
47 platforms = platforms.all;
48 maintainers = with maintainers; [ misuzu ];
49 };
50}