Unverified Commit d15765c0 authored by silvanshade's avatar silvanshade
Browse files

libblake3: fix FreeBSD cross-compile builds

parent 3e5422c2
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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))