nixos-config/packages/obs/obs-websocket/default.nix

40 lines
963 B
Nix
Raw Permalink Normal View History

2023-03-31 22:12:40 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake, ninja, pkg-config
, qtbase, wrapQtAppsHook
, nlohmann_json, asio, websocketpp
, obs-studio
}:
stdenv.mkDerivation rec {
pname = "obs-websocket";
version = "4.9.1-compat";
src = fetchFromGitHub {
owner = "obsproject";
repo = pname;
rev = "${version}";
sha256 = "14xhk6d7j2q5swfj0b7jdgmswjdkqjnj3q11qs5vbh93hk30jyvh";
};
nativeBuildInputs = [ cmake ninja pkg-config wrapQtAppsHook ];
buildInputs = [ obs-studio qtbase nlohmann_json asio websocketpp ];
cmakeFlags = [
"-DLIBOBS_INCLUDE_DIR=${obs-studio.src}/libobs"
"-Wno-dev"
];
preConfigure = ''
cp ${obs-studio.src}/cmake/external/ObsPluginHelpers.cmake cmake/FindLibObs.cmake
'';
meta = with lib; {
description = "Remote-control of OBS Studio through WebSocket";
homepage = "https://github.com/obsproject/obs-websocket";
license = licenses.gpl2;
platforms = [ "x86_64-linux" "i686-linux" ];
};
}