Unverified Commit d597182f authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

flann, dartsim: fix build on darwin (#462439)

parents d8313a46 50d30186
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -138,6 +138,8 @@ stdenv.mkDerivation (finalAttrs: {
    python3Packages.pythonImportsCheckHook
  ];

  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=deprecated-literal-operator";

  doCheck = true;

  pythonImportsCheck = [ "dartpy" ];
+8 −0
Original line number Diff line number Diff line
@@ -54,6 +54,14 @@ stdenv.mkDerivation rec {
    })
  ];

  # The LZ4 patch updates cmake_minimum_required to 3.12, but only for non-clang builds.
  # For clang builds (like Darwin), we need to manually update it.
  # ref. https://github.com/flann-lib/flann/pull/526 not merged yet
  postPatch = lib.optionalString stdenv.cc.isClang ''
    substituteInPlace CMakeLists.txt \
      --replace-fail "cmake_minimum_required(VERSION 2.6)" "cmake_minimum_required(VERSION 3.5)"
  '';

  cmakeFlags = [
    "-DBUILD_EXAMPLES:BOOL=OFF"
    "-DBUILD_TESTS:BOOL=OFF"