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

glaze: add a few missing build-time options (#446397)

parents 29daf46a 70a87b6c
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -3,7 +3,10 @@
  stdenv,
  fetchFromGitHub,
  cmake,
  enableAvx2 ? false,
  openssl,
  enableSIMD ? stdenv.hostPlatform.avx2Support,
  enableSSL ? true,
  enableInterop ? true,
}:

stdenv.mkDerivation (final: {
@@ -18,7 +21,14 @@ stdenv.mkDerivation (final: {
  };

  nativeBuildInputs = [ cmake ];
  cmakeFlags = [ (lib.cmakeBool "glaze_ENABLE_AVX2" enableAvx2) ];
  buildInputs = lib.optionals enableSSL [ openssl ];

  # https://github.com/stephenberry/glaze/blob/main/CMakeLists.txt
  cmakeFlags = [
    (lib.cmakeBool "glaze_DISABLE_SIMD_WHEN_SUPPORTED" (!enableSIMD))
    (lib.cmakeBool "glaze_ENABLE_SSL" enableSSL)
    (lib.cmakeBool "glaze_BUILD_INTEROP" enableInterop)
  ];

  meta = {
    description = "Extremely fast, in memory, JSON and interface library for modern C++";