1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

packaging-nix: add libdatachannel for webrtc node

Signed-off-by: Philipp Jungkamp <Philipp.Jungkamp@opal-rt.com>
This commit is contained in:
Philipp Jungkamp 2023-06-12 17:57:04 +02:00
parent 03ad3a77aa
commit 0d69a0eefb
4 changed files with 55 additions and 1 deletions

View file

@ -51,6 +51,25 @@
"type": "github"
}
},
"libdatachannel": {
"flake": false,
"locked": {
"lastModified": 1683797946,
"narHash": "sha256-kSK+5gFMG6tq89R1m08gNBKPdwyR/mLEDhWXQ/uk34o=",
"ref": "refs/tags/v0.18.4",
"rev": "7a5e01071ae635e06f175233abd11d623f09cbb8",
"revCount": 2459,
"submodules": true,
"type": "git",
"url": "https://github.com/paullouisageneau/libdatachannel.git"
},
"original": {
"ref": "refs/tags/v0.18.4",
"submodules": true,
"type": "git",
"url": "https://github.com/paullouisageneau/libdatachannel.git"
}
},
"libiec61850": {
"flake": false,
"locked": {
@ -88,6 +107,7 @@
"common": "common",
"fpga": "fpga",
"lib60870": "lib60870",
"libdatachannel": "libdatachannel",
"libiec61850": "libiec61850",
"nixpkgs": "nixpkgs"
}

View file

@ -19,6 +19,14 @@
flake = false;
};
libdatachannel = {
type = "git";
url = "https://github.com/paullouisageneau/libdatachannel.git";
ref = "refs/tags/v0.18.4";
submodules = true;
flake = false;
};
libiec61850 = {
url = "github:mz-automation/libiec61850/v1.5.1";
flake = false;
@ -79,6 +87,10 @@
src = inputs.lib60870;
};
libdatachannel = pkgs.callPackage ./libdatachannel.nix {
src = inputs.libdatachannel;
};
libiec61850 = pkgs.callPackage ./libiec61850.nix {
src = inputs.libiec61850;
};
@ -98,7 +110,7 @@
# standard flake attribute allowing you to add the villas packages to your nixpkgs
overlays = {
default = overlay;
default = overlay;
};
# standard flake attribute for defining developer environments

View file

@ -0,0 +1,19 @@
{
cmake,
lib,
stdenv,
src,
openssl,
}:
stdenv.mkDerivation {
pname = "libdatachannel";
version = "villas";
src = src;
nativeBuildInputs = [cmake];
buildInputs = [openssl];
meta = with lib; {
description = "C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets";
homepage = "https://libdatachannel.org/";
license = licenses.mpl20;
};
}

View file

@ -24,6 +24,7 @@
withNodeSocket ? withAllNodes,
withNodeTemper ? withAllNodes,
withNodeUldaq ? withAllNodes,
withNodeWebrtc ? withAllNodes,
withNodeZeromq ? withAllNodes,
# minimal dependencies
cmake,
@ -43,6 +44,7 @@
jansson,
lib60870,
libconfig,
libdatachannel,
libiec61850,
libnl,
libre,
@ -117,6 +119,7 @@ stdenv.mkDerivation {
++ lib.optionals withNodeSocket [libnl]
++ lib.optionals withNodeTemper [libusb]
++ lib.optionals withNodeUldaq [libuldaq]
++ lib.optionals withNodeWebrtc [libdatachannel]
++ lib.optionals withNodeZeromq [czmq libsodium];
meta = with lib; {
mainProgram = "villas";