diff options
author | misuzu <bakalolka@gmail.com> | 2023-02-03 19:56:56 +0200 |
---|---|---|
committer | misuzu <bakalolka@gmail.com> | 2023-02-03 19:56:56 +0200 |
commit | 56ef7f8e5f8868da55ae843b1d2d8113562e9ba9 (patch) | |
tree | e3ccbad88b9881a70890c5922ad3aaa83d30dc41 /pkgs/applications/blockchains/ton | |
parent | 4d7c2644dbac9cf8282c0afe68fca8f0f3e7b2db (diff) |
ton: init at 2023.01
Diffstat (limited to 'pkgs/applications/blockchains/ton')
-rw-r--r-- | pkgs/applications/blockchains/ton/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/applications/blockchains/ton/default.nix b/pkgs/applications/blockchains/ton/default.nix new file mode 100644 index 0000000000000..f333fcd05dc77 --- /dev/null +++ b/pkgs/applications/blockchains/ton/default.nix @@ -0,0 +1,51 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, git +, gperf +, libmicrohttpd +, openssl +, readline +, zlib +}: + +stdenv.mkDerivation rec { + pname = "ton"; + version = "2023.01"; + + src = fetchFromGitHub { + owner = "ton-blockchain"; + repo = "ton"; + rev = "v${version}"; + sha256 = "sha256-wb96vh0YcTBFE8EzBItdTf88cvRMLW2XxcGJpNetOi8="; + fetchSubmodules = true; + }; + + postPatch = '' + # without this fails on aarch64-darwin with clang-11: error: the clang compiler does not support '-mcpu=apple-m1' + substituteInPlace CMakeLists.txt \ + --replace 'set(TON_ARCH "apple-m1")' "" + ''; + + nativeBuildInputs = [ + cmake + git + ]; + + buildInputs = [ + gperf + libmicrohttpd + openssl + readline + zlib + ]; + + meta = with lib; { + description = "A fully decentralized layer-1 blockchain designed by Telegram"; + homepage = "https://ton.org/"; + license = licenses.lgpl2Only; + platforms = platforms.all; + maintainers = with maintainers; [ misuzu ]; + }; +} |