h2o: add optional mruby support

This commit is contained in:
โทสฺตัล 2025-02-13 15:53:28 +07:00
parent 81ec571808
commit 2f4ee1e664

View File

@ -13,6 +13,9 @@
libuv,
wslay,
zlib,
withMruby ? false,
bison,
ruby,
}:
stdenv.mkDerivation (finalAttrs: {
@ -33,12 +36,18 @@ stdenv.mkDerivation (finalAttrs: {
"lib"
];
nativeBuildInputs = [
pkg-config
cmake
makeWrapper
ninja
];
nativeBuildInputs =
[
pkg-config
cmake
makeWrapper
ninja
]
++ lib.optionals withMruby [
bison
ruby
];
buildInputs = [
brotli
openssl
@ -49,6 +58,10 @@ stdenv.mkDerivation (finalAttrs: {
wslay
];
cmakeFlags = [
"-DWITH_MRUBY=${if withMruby then "ON" else "OFF"}"
];
postInstall = ''
EXES="$(find "$out/share/h2o" -type f -executable)"
for exe in $EXES; do