nixpkgs/pkgs/by-name/li/libdatachannel/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.2 KiB
Nix
Raw Normal View History

{
stdenv,
lib,
fetchFromGitHub,
cmake,
ninja,
pkg-config,
libnice,
openssl,
plog,
srtp,
usrsctp,
2023-06-10 19:45:17 +00:00
}:
stdenv.mkDerivation rec {
pname = "libdatachannel";
2024-10-24 00:29:03 +00:00
version = "0.22.2";
2023-06-10 19:45:17 +00:00
src = fetchFromGitHub {
owner = "paullouisageneau";
2024-03-13 17:33:24 +00:00
repo = "libdatachannel";
2023-06-10 19:45:17 +00:00
rev = "v${version}";
2024-10-24 00:29:03 +00:00
hash = "sha256-ZGxv4JfJ3b0S7zacIHBlBtCbChADCQG1CfxStA1lKKE=";
2023-06-10 19:45:17 +00:00
};
outputs = [
"out"
"dev"
];
2023-06-10 19:45:17 +00:00
strictDeps = true;
2023-06-10 19:45:17 +00:00
nativeBuildInputs = [
cmake
ninja
pkg-config
];
2023-06-10 19:45:17 +00:00
buildInputs = [
libnice
openssl
srtp
2023-09-16 07:37:15 +00:00
usrsctp
plog
2023-06-10 19:45:17 +00:00
];
cmakeFlags = [
"-DUSE_NICE=ON"
2023-09-16 07:37:15 +00:00
"-DPREFER_SYSTEM_LIB=ON"
2023-06-10 19:45:17 +00:00
"-DNO_EXAMPLES=ON"
];
postFixup = ''
# Fix include path that will be incorrect due to the "dev" output
substituteInPlace "$dev/lib/cmake/LibDataChannel/LibDataChannelTargets.cmake" \
--replace-fail "\''${_IMPORT_PREFIX}/include" "$dev/include"
2023-06-10 19:45:17 +00:00
'';
meta = with lib; {
description = "C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets";
homepage = "https://libdatachannel.org/";
license = with licenses; [ mpl20 ];
maintainers = with maintainers; [ erdnaxe ];
platforms = platforms.linux ++ platforms.darwin;
2023-06-10 19:45:17 +00:00
};
}