diff --git a/pkgs/applications/video/obs-studio/plugins/default.nix b/pkgs/applications/video/obs-studio/plugins/default.nix index 70bb389ff6da..41b0019a9fbc 100644 --- a/pkgs/applications/video/obs-studio/plugins/default.nix +++ b/pkgs/applications/video/obs-studio/plugins/default.nix @@ -16,6 +16,8 @@ obs-backgroundremoval = callPackage ./obs-backgroundremoval { }; + obs-command-source = callPackage ./obs-command-source.nix { }; + obs-gstreamer = callPackage ./obs-gstreamer.nix { }; obs-hyperion = qt6Packages.callPackage ./obs-hyperion/default.nix { }; diff --git a/pkgs/applications/video/obs-studio/plugins/obs-command-source.nix b/pkgs/applications/video/obs-studio/plugins/obs-command-source.nix new file mode 100644 index 000000000000..f38d53a14101 --- /dev/null +++ b/pkgs/applications/video/obs-studio/plugins/obs-command-source.nix @@ -0,0 +1,36 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, obs-studio +}: + +stdenv.mkDerivation rec { + pname = "obs-command-source"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "norihiro"; + repo = "obs-command-source"; + rev = version; + sha256 = "sha256-rBGMQb7iGtxF54bBOK5lHI6VFYCSEyeSq2Arz0T0DPo="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ obs-studio ]; + + postInstall = '' + mkdir $out/lib $out/share + mv $out/obs-plugins/64bit $out/lib/obs-plugins + rm -rf $out/obs-plugins + mv $out/data $out/share/obs + ''; + + meta = with lib; { + description = "OBS Studio plugin that provides a dummy source to execute arbitrary commands when a scene is switched."; + homepage = "https://github.com/norihiro/command-source"; + maintainers = with maintainers; [ flexiondotorg ]; + license = licenses.gpl2Plus; + platforms = [ "x86_64-linux" "i686-linux" ]; + }; +}