From bca7f70cc2e25da1b91f237c98e0ad9966e76c55 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Tue, 13 Jun 2023 10:40:53 +0200 Subject: [PATCH] packaging-nix: tailor libdatachannel compilation to our needs - Use libnice for better ICE protocol support. - Disable websockets support since we are already using libwebsockets. - Disable media transport facilities. Signed-off-by: Philipp Jungkamp --- packaging/nix/libdatachannel.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packaging/nix/libdatachannel.nix b/packaging/nix/libdatachannel.nix index 64aec66e5..8821842e9 100644 --- a/packaging/nix/libdatachannel.nix +++ b/packaging/nix/libdatachannel.nix @@ -1,6 +1,9 @@ { cmake, lib, + libnice, + libpcap, + pkg-config, stdenv, src, openssl, @@ -9,8 +12,13 @@ stdenv.mkDerivation { pname = "libdatachannel"; version = "villas"; src = src; - nativeBuildInputs = [cmake]; - buildInputs = [openssl]; + nativeBuildInputs = [cmake pkg-config]; + buildInputs = [libnice libpcap openssl]; + cmakeFlags = [ + "-DUSE_NICE=ON" # use libnice for better protocol support + "-DNO_WEBSOCKET=ON" # villas uses libwebsockets instead + "-DNO_MEDIA=ON" # villas does not use media transport features + ]; meta = with lib; { description = "C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets"; homepage = "https://libdatachannel.org/";