diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix index dc8da1af447b..e34350615636 100644 --- a/pkgs/development/tools/parsing/tree-sitter/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -5,6 +5,7 @@ , callPackage , enableShared ? true , enableStatic ? false +, Security }: # TODO: move to carnix or https://github.com/kolloch/crate2nix @@ -51,6 +52,8 @@ in rustPlatform.buildRustPackage { pname = "tree-sitter"; inherit src version cargoSha256; + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + nativeBuildInputs = [ emscripten which ]; postPatch = '' @@ -103,9 +106,8 @@ in rustPlatform.buildRustPackage { ''; license = lib.licenses.mit; maintainers = with lib.maintainers; [ Profpatsch ]; - # Darwin needs some more work with default libraries # Aarch has test failures with how tree-sitter compiles the generated C files - broken = stdenv.isDarwin || stdenv.isAarch64; + broken = stdenv.isAarch64; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e0130cc1c1b..8687d77a8249 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11885,7 +11885,9 @@ in travis = callPackage ../development/tools/misc/travis { }; - tree-sitter = callPackage ../development/tools/parsing/tree-sitter { }; + tree-sitter = callPackage ../development/tools/parsing/tree-sitter { + inherit (darwin.apple_sdk.frameworks) Security; + }; trellis = callPackage ../development/tools/trellis { };