Skip to content

Commit

Permalink
v4l2-to-ndi: init at 0-unstable-2022-09-14 (NixOS#279586)
Browse files Browse the repository at this point in the history
* 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
2 people authored and doronbehar committed Dec 22, 2024
1 parent c1d3d3e commit 8453924
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions pkgs/by-name/v4/v4l2-to-ndi/package.nix
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;
};
}

0 comments on commit 8453924

Please sign in to comment.