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

This commit is contained in:
Aleksana
2025-11-25 06:06:28 +00:00
committed by GitHub
+12 -2
View File
@@ -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++";