From 70a87b6c7251a8c2737866d3fb1e65817ffd0cab Mon Sep 17 00:00:00 2001 From: moni-dz Date: Sat, 27 Sep 2025 00:40:55 +0800 Subject: [PATCH] glaze: add a few missing build-time options Co-authored-by: Aleksana --- pkgs/by-name/gl/glaze/package.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gl/glaze/package.nix b/pkgs/by-name/gl/glaze/package.nix index 49288a4bccf4..5da1934e4fab 100644 --- a/pkgs/by-name/gl/glaze/package.nix +++ b/pkgs/by-name/gl/glaze/package.nix @@ -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++";