From ee6562d051210f117e518ce5bb6047d8a42a972a Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 4 Jul 2023 10:58:27 +0300 Subject: [PATCH] tremor-rs: fix build on x86_64-darwin --- pkgs/tools/misc/tremor-rs/default.nix | 8 +++++++- pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/tremor-rs/default.nix b/pkgs/tools/misc/tremor-rs/default.nix index 71899299e2d..62ddf4e725e 100644 --- a/pkgs/tools/misc/tremor-rs/default.nix +++ b/pkgs/tools/misc/tremor-rs/default.nix @@ -63,6 +63,13 @@ rustPlatform.buildRustPackage rec { PROTOC = "${protobuf}/bin/protoc"; PROTOC_INCLUDE = "${protobuf}/include"; + env = lib.optionalAttrs (stdenv.system == "x86_64-darwin") { + RUSTFLAGS = "-C target-feature=+avx,+avx2,+sse4.2"; + }; + + # tests failed on x86_64-darwin with SIGILL: illegal instruction + doCheck = !(stdenv.system == "x86_64-darwin"); + checkFlags = [ # all try to make a network access "--skip=connectors::tests::http::server::https_server_test" @@ -77,7 +84,6 @@ rustPlatform.buildRustPackage rec { cargoBuildFlags = [ "-p tremor-cli" ]; meta = with lib; { - broken = stdenv.isDarwin && stdenv.isx86_64; description = '' Early stage event processing system for unstructured data with rich support for structural pattern matching, filtering and transformation diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e84d0716f4..eccf0a95f4e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14090,8 +14090,8 @@ with pkgs; tre = callPackage ../development/libraries/tre { }; - tremor-rs = callPackage ../tools/misc/tremor-rs { - inherit (darwin.apple_sdk.frameworks) Security; + tremor-rs = darwin.apple_sdk_11_0.callPackage ../tools/misc/tremor-rs { + inherit (darwin.apple_sdk_11_0.frameworks) Security; }; tremor-language-server = callPackage ../tools/misc/tremor-rs/ls.nix { };