summary refs log tree commit diff
path: root/pkgs/applications/video/obs-studio/obs-ndi.nix
blob: 450ebf4ac20d0dfe66ee9e9d7ad48763f61580a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# We don't have a wrapper which can supply obs-studio plugins so you have to
# somewhat manually install this:

# nix-env -f "<nixpkgs>" -iA obs-ndi
# mkdir -p ~/.config/obs-studio/plugins
# ln -s ~/.nix-profile/share/obs/obs-plugins/obs-ndi ~/.config/obs-studio/plugins/

{ stdenv, fetchFromGitHub, obs-studio, cmake, qt5 }:

stdenv.mkDerivation rec {
  pname = "obs-ndi";
  version = "4.7.1";

  src = fetchFromGitHub {
    owner = "Palakis";
    repo = "obs-ndi";
    rev = version;
    sha256 = "040fkbf3f3qgqcrd3072y3zrjb4fwga8zr10jym744xd7bgyylqh";
  };

  patches = [ ./fix-search-path.patch ];

  nativeBuildInputs = [ cmake ];
  buildInputs = [ obs-studio qt5.qtbase ];

  cmakeFlags = [
    "-DLIBOBS_INCLUDE_DIR=${obs-studio}/include/obs"
    "-DLIBOBS_LIB=${obs-studio}/lib"
    "-DCMAKE_CXX_FLAGS=-I${obs-studio.src}/UI/obs-frontend-api"
  ];

  meta = with stdenv.lib; {
    description = "Network A/V plugin for OBS Studio";
    homepage = https://github.com/Palakis/obs-ndi;
    maintainers = with maintainers; [ peti ];
    license = licenses.gpl2;
    platforms = with platforms; linux;
  };
}