From 0e9d57971c0bd3bec20481b8972f71b1ab782047 Mon Sep 17 00:00:00 2001 From: Sander Niemeijer Date: Fri, 28 Jul 2023 16:22:40 +0200 Subject: [PATCH] tiledb: don't require AVX2 instructions This disables AVX2 support when it is not supported by the `hostPlatform`'s CPU. The newly added `useAVX2` option allows overriding the default. --- pkgs/development/libraries/tiledb/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/tiledb/default.nix b/pkgs/development/libraries/tiledb/default.nix index 163e35971a7..21c63f71221 100644 --- a/pkgs/development/libraries/tiledb/default.nix +++ b/pkgs/development/libraries/tiledb/default.nix @@ -17,6 +17,7 @@ , gtest , doxygen , fixDarwinDylibNames +, useAVX2 ? stdenv.hostPlatform.avx2Support }: stdenv.mkDerivation rec { @@ -34,7 +35,7 @@ stdenv.mkDerivation rec { # unaccelerated routines. cmakeFlags = [ "-DTILEDB_WERROR=0" - ]; + ] ++ lib.optional (!useAVX2) "-DCOMPILER_SUPPORTS_AVX2=FALSE"; nativeBuildInputs = [ clang-tools