2023-02-09 11:40:11 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, git
|
2023-04-29 16:46:19 +00:00
|
|
|
, pkg-config
|
2023-02-09 11:40:11 +00:00
|
|
|
, gperf
|
|
|
|
, libmicrohttpd
|
2024-02-29 20:09:43 +00:00
|
|
|
, libsodium
|
2024-05-15 15:35:15 +00:00
|
|
|
, lz4
|
2023-02-09 11:40:11 +00:00
|
|
|
, openssl
|
|
|
|
, readline
|
2024-02-29 20:09:43 +00:00
|
|
|
, secp256k1
|
2023-02-09 11:40:11 +00:00
|
|
|
, zlib
|
2024-01-02 11:29:13 +00:00
|
|
|
, nix-update-script
|
2023-02-09 11:40:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ton";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2024.04";
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ton-blockchain";
|
|
|
|
repo = "ton";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-hh8D4IZX6RS/RXdhVONhgetqp89kpTC2IwDQ2KHdKsE=";
|
2023-02-09 11:40:11 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
git
|
2023-04-29 16:46:19 +00:00
|
|
|
pkg-config
|
2023-02-09 11:40:11 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gperf
|
|
|
|
libmicrohttpd
|
2024-02-29 20:09:43 +00:00
|
|
|
libsodium
|
2024-05-15 15:35:15 +00:00
|
|
|
lz4
|
2023-02-09 11:40:11 +00:00
|
|
|
openssl
|
|
|
|
readline
|
2024-02-29 20:09:43 +00:00
|
|
|
secp256k1
|
2023-02-09 11:40:11 +00:00
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
# 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;
|
2023-02-09 11:40:11 +00:00
|
|
|
description = "A fully decentralized layer-1 blockchain designed by Telegram";
|
|
|
|
homepage = "https://ton.org/";
|
2023-04-29 16:46:19 +00:00
|
|
|
changelog = "https://github.com/ton-blockchain/ton/blob/v${version}/Changelog.md";
|
2023-02-09 11:40:11 +00:00
|
|
|
license = licenses.lgpl2Only;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ misuzu ];
|
|
|
|
};
|
|
|
|
}
|