- binding.gyp: resolve libdatachannel include/.so via LDC_INCLUDE/LDC_LIB env (node -e expression) instead of hardcoded /tmp/ldc-build paths - flake buildPhase: run node-gyp from native/libdatachannel-min root (was build/ subdir → 'binding.gyp not found'); export LDC_INCLUDE (fetchFromGitHub source) + LDC_LIB (cmake build dir) - flake installPhase: tolerate missing binding (screen share disabled, gateway still starts); copy .so real files via -rL
22 lines
724 B
Python
22 lines
724 B
Python
{
|
|
"targets": [
|
|
{
|
|
"target_name": "libdatachannel_min",
|
|
"sources": ["binding.cpp"],
|
|
"include_dirs": [
|
|
"<!@(node -p \"require('node-addon-api').include\")",
|
|
"<!(node -e \"const s=process.env.LDC_INCLUDE||'/nix/store/39a85gpfjqy3h3k8jwrwh7m9yc3inqw7-source';console.log(s+'/include')\")"
|
|
],
|
|
"libraries": [
|
|
"<!(node -e \"const s=process.env.LDC_LIB||'/tmp/ldc-build';console.log(s+'/libdatachannel.so.0.24.0')\")"
|
|
],
|
|
"cflags": ["-std=c++17", "-fexceptions"],
|
|
"cflags_cc": ["-std=c++17", "-fexceptions"],
|
|
"defines": ["NAPI_CPP_EXCEPTIONS"],
|
|
"conditions": [
|
|
["OS=='linux'", { "cflags": ["-fvisibility=hidden"] }]
|
|
]
|
|
}
|
|
]
|
|
}
|