diff --git a/pkgs/by-name/li/libblake3/package.nix b/pkgs/by-name/li/libblake3/package.nix index 81330f818f79b..4ef8515a2bb4a 100644 --- a/pkgs/by-name/li/libblake3/package.nix +++ b/pkgs/by-name/li/libblake3/package.nix @@ -3,6 +3,7 @@ stdenv, cmake, fetchFromGitHub, + fetchpatch, tbb_2021_11, useTBB ? true, @@ -28,6 +29,15 @@ stdenv.mkDerivation (finalAttrs: { tbb_2021_11 ]; + patches = [ + # build(cmake): Relax Clang frontend variant detection (BLAKE3-team/BLAKE3#477) + (fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/BLAKE3-team/BLAKE3/pull/477.patch"; + hash = "sha256-kidCMGd/i9D9HLLTt7l1DbiU71sFTEyr3Vew4XHUHls="; + relative = "c"; + }) + ]; + cmakeFlags = [ (lib.cmakeBool "BLAKE3_USE_TBB" useTBB) (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) diff --git a/pkgs/development/libraries/tbb/2022_0.nix b/pkgs/development/libraries/tbb/2022_0.nix index 14231faf60683..75348dfa33234 100644 --- a/pkgs/development/libraries/tbb/2022_0.nix +++ b/pkgs/development/libraries/tbb/2022_0.nix @@ -34,11 +34,12 @@ stdenv.mkDerivation rec { url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/899.patch"; hash = "sha256-kU6RRX+sde0NrQMKlNtW3jXav6J4QiVIUmD50asmBPU="; }) - ]; - - cmakeFlags = [ - # Skip tests to work around https://github.com/uxlfoundation/oneTBB/issues/1695 - (lib.cmakeBool "TBB_TEST" (!stdenv.hostPlatform.isWindows)) + # Fix tests on FreeBSD and Windows + (fetchpatch { + name = "fix-tbb-freebsd-and-windows-tests.patch"; + url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1696.patch"; + hash = "sha256-yjX2FkOK8bz29a/XSA7qXgQw9lxzx8VIgEBREW32NN4="; + }) ]; # Fix build with modern gcc diff --git a/pkgs/development/libraries/tbb/default.nix b/pkgs/development/libraries/tbb/default.nix index 05e18da04560c..8b677cc4f77eb 100644 --- a/pkgs/development/libraries/tbb/default.nix +++ b/pkgs/development/libraries/tbb/default.nix @@ -44,11 +44,12 @@ stdenv.mkDerivation rec { url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/1193.patch"; hash = "sha256-ZQbwUmuIZoGVBof8QNR3V8vU385e2X7EvU3+Fbj4+M8="; }) - ]; - - cmakeFlags = [ - # Skip tests to work around https://github.com/uxlfoundation/oneTBB/issues/1695 - (lib.cmakeBool "TBB_TEST" (!stdenv.hostPlatform.isWindows)) + # Fix tests on FreeBSD and Windows + (fetchpatch { + name = "fix-tbb-freebsd-and-windows-tests.patch"; + url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1696.patch"; + hash = "sha256-yjX2FkOK8bz29a/XSA7qXgQw9lxzx8VIgEBREW32NN4="; + }) ]; # Fix build with modern gcc