-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v4l2-to-ndi: init at 0-unstable-2022-09-14 (#279586)
* v4l2-to-ndi: init at 0-unstable-2022-09-14 * Update pkgs/by-name/v4/v4l2-to-ndi/package.nix Co-authored-by: Arne Keller <[email protected]>
- Loading branch information
1 parent
0dd0353
commit 48266de
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
autoPatchelfHook, | ||
openssl, | ||
curl, | ||
avahi, | ||
ndi, | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "v4l2-to-ndi"; | ||
version = "0-unstable-2022-09-14"; | ||
|
||
nativeBuildInputs = [ autoPatchelfHook ]; | ||
|
||
buildInputs = [ | ||
openssl | ||
curl | ||
avahi | ||
ndi | ||
]; | ||
|
||
src = fetchFromGitHub { | ||
owner = "lplassman"; | ||
repo = "V4L2-to-NDI"; | ||
rev = "4dd5e9594acc4f154658283ee52718fa58018ac9"; | ||
hash = "sha256-blB8HRfO2k1zsZamugOXZzW8uS26uf8+7sA0zBbV/K4="; | ||
}; | ||
|
||
buildPhase = '' | ||
runHook preBuild | ||
mkdir build | ||
g++ -std=c++14 -pthread -Wl,--allow-shlib-undefined -Wl,--as-needed \ | ||
-I'NDI SDK for Linux'/include/ \ | ||
-Iinclude/ \ | ||
-L'NDI SDK for Linux'/lib/x86_64-linux-gnu \ | ||
-o build/v4l2ndi main.cpp PixelFormatConverter.cpp -lndi -ldl | ||
runHook postBuild | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir $out | ||
cp -r build $out/bin | ||
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Video input (V4L2) to NDI converter"; | ||
homepage = "https://github.com/lplassman/V4L2-to-NDI"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ | ||
pinpox | ||
MayNiklas | ||
]; | ||
mainProgram = "v4l2ndi"; | ||
platforms = platforms.linux; | ||
}; | ||
} |