a bunch of stuff, including upgrade to wayland and ndi streaming to imac
This commit is contained in:
54
mods/nurPkgs/ndi-monitor.nix
Normal file
54
mods/nurPkgs/ndi-monitor.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, ndi
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ndi-monitor";
|
||||
version = "0.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lplassman";
|
||||
repo = "NDI-Monitor";
|
||||
rev = "f4ae6506d308b1b847e449833aa4cea3555caf15";
|
||||
sha256 = "sha256-YLNvFdyqKb6DJV/cmdF8O5hmxOOqCCFbwGlFxI6rpW0=";
|
||||
};
|
||||
|
||||
patches = [ ./ndi-monitor.patch ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
ndi
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
g++ -std=c++14 -pthread -Wl,--allow-shlib-undefined -Wl,--as-needed -Iinclude/ -I${ndi}/include/ -L lib -o ndi_monitor ndi_monitor.cpp mongoose.c mjson.c -lndi -ldl
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ndi_monitor $out/bin/ndi-monitor
|
||||
cp -r $src/assets $out
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
#ncurses
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A small pogram to display network traffic of interfaces in realtime";
|
||||
longDescription = ''
|
||||
Simple curses-based GUI.
|
||||
|
||||
It is useful for Internet or LAN speed tests, measuring the velocity of a link, to establish a benchmark or to monitor your connections.
|
||||
|
||||
CBM can be used with virtual, wired or wireless networks.
|
||||
|
||||
Originally imported from some tarballs from the Debian Project: http://snapshot.debian.org/package/cbm/. Now maintained by volunteers.
|
||||
'';
|
||||
homepage = "https://github.com/resurrecting-open-source-projects/cbm";
|
||||
license = licenses.gpl2Only;
|
||||
#maintainers = [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
13
mods/nurPkgs/ndi-monitor.patch
Normal file
13
mods/nurPkgs/ndi-monitor.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/ndi_monitor.cpp b/ndi_monitor.cpp
|
||||
index 6de4dff..6b5c35b 100644
|
||||
--- a/ndi_monitor.cpp
|
||||
+++ b/ndi_monitor.cpp
|
||||
@@ -84,7 +84,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data){
|
||||
}else if(mg_http_match_uri(hm, "/rest")) { //handle REST events
|
||||
mg_http_reply(c, 200, "", "{\"result\": %d}\n", 123);
|
||||
}else{ // Serve static files
|
||||
- struct mg_http_serve_opts opts = {.root_dir = "/opt/ndi_monitor/assets/"};
|
||||
+ struct mg_http_serve_opts opts = {.root_dir = getenv("NDI_MONITOR_ASSETS_DIR")};
|
||||
mg_http_serve_dir(c, (mg_http_message*)ev_data, &opts);
|
||||
}
|
||||
}else if (ev == MG_EV_WS_MSG){
|
||||
Reference in New Issue
Block a user