Commit 0b724ce0 authored by Audrey Dutcher's avatar Audrey Dutcher
Browse files

roc-toolkit: fix build for FreeBSD

parent 2fa2e9a3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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";