From b27ac6e75fe3e9bb907c0b1487c0e2389bbbc67e Mon Sep 17 00:00:00 2001 From: Sam <30577766+Samasaur1@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:14:36 -0800 Subject: [PATCH] ton: fix build on Darwin --- pkgs/by-name/to/ton/package.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/to/ton/package.nix b/pkgs/by-name/to/ton/package.nix index f929c0b618b0..bccdd713aaff 100644 --- a/pkgs/by-name/to/ton/package.nix +++ b/pkgs/by-name/to/ton/package.nix @@ -13,6 +13,8 @@ , secp256k1 , zlib , nix-update-script +, darwinMinVersionHook +, apple-sdk_11 }: stdenv.mkDerivation rec { @@ -44,14 +46,15 @@ stdenv.mkDerivation rec { readline secp256k1 zlib + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer + (darwinMinVersionHook "10.13") + apple-sdk_11 ]; 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.hostPlatform.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";