roc-toolkit: fix build for FreeBSD (#387692)

This commit is contained in:
Aleksana 2025-03-08 19:54:27 +08:00 committed by GitHub
commit 11ca1c3d1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,6 +68,7 @@ stdenv.mkDerivation rec {
++ lib.optional (!libunwindSupport) "--disable-libunwind"
++ lib.optional (!pulseaudioSupport) "--disable-pulseaudio"
++ lib.optional (!libsndfileSupport) "--disable-sndfile"
++ lib.optional stdenv.hostPlatform.isFreeBSD "--platform=unix"
++ (
if (!openfecSupport) then
[ "--disable-openfec" ]
@ -78,6 +79,11 @@ stdenv.mkDerivation rec {
]
);
env = lib.optionalAttrs stdenv.hostPlatform.isFreeBSD {
NIX_CFLAGS_COMPILE = "-D_XOPEN_SOURCE=700 -D__BSD_VISIBLE";
NIX_LDFLAGS = "-lpthread";
};
meta = with lib; {
description = "Roc is a toolkit for real-time audio streaming over the network";
homepage = "https://github.com/roc-streaming/roc-toolkit";