obs-studio: 31.1.2 -> 32.0.1 (#447035)
This commit is contained in:
-33
@@ -1,33 +0,0 @@
|
||||
From 0de0a90f8fe5e1e48fa4ec7aa7c825ef88770f9d Mon Sep 17 00:00:00 2001
|
||||
From: Ryan Foster <RytoEX@gmail.com>
|
||||
Date: Mon, 9 Sep 2019 23:55:02 -0400
|
||||
Subject: [PATCH] Enable file access and universal access for file URLs
|
||||
|
||||
When loading a local file, instead of disabling CEF's web security,
|
||||
enable file access and universal access for file URLs. This should allow
|
||||
local files to make CORS requests without completely disabling CEF's
|
||||
security model.
|
||||
---
|
||||
obs-browser-source.cpp | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/obs-browser-source.cpp b/obs-browser-source.cpp
|
||||
index 09b3017..1094340 100644
|
||||
--- a/plugins/obs-browser/obs-browser-source.cpp
|
||||
+++ b/plugins/obs-browser/obs-browser-source.cpp
|
||||
@@ -239,9 +239,12 @@ bool BrowserSource::CreateBrowser()
|
||||
|
||||
#if ENABLE_LOCAL_FILE_URL_SCHEME && CHROME_VERSION_BUILD < 4430
|
||||
if (is_local) {
|
||||
- /* Disable web security for file:// URLs to allow
|
||||
- * local content access to remote APIs */
|
||||
- cefBrowserSettings.web_security = STATE_DISABLED;
|
||||
+ /* Enable file access and universal access from file://
|
||||
+ * URLs to allow local content access to remote APIs */
|
||||
+ cefBrowserSettings.file_access_from_file_urls =
|
||||
+ STATE_ENABLED;
|
||||
+ cefBrowserSettings.universal_access_from_file_urls =
|
||||
+ STATE_ENABLED;
|
||||
}
|
||||
#endif
|
||||
auto browser = CefBrowserHost::CreateBrowserSync(
|
||||
@@ -59,6 +59,7 @@
|
||||
libdatachannel,
|
||||
libvpl,
|
||||
qrcodegencpp,
|
||||
simde,
|
||||
nix-update-script,
|
||||
extra-cmake-modules,
|
||||
}:
|
||||
@@ -82,21 +83,19 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "obs-studio";
|
||||
version = "31.1.2";
|
||||
version = "32.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "obsproject";
|
||||
repo = "obs-studio";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-QZoIyjliVruDPZj8hzTABaDn+nCTVs5qQCdBLtSOKvI=";
|
||||
hash = "sha256-99VAVV3hEMDI2R30OrX/in/9KtesUxMGOPg6yT5e4oM=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
patches = [
|
||||
# Lets obs-browser build against CEF 90.1.0+
|
||||
./Enable-file-access-and-universal-access-for-file-URL.patch
|
||||
./fix-nix-plugin-path.patch
|
||||
];
|
||||
|
||||
@@ -156,6 +155,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ optional browserSupport cef
|
||||
++ optional withFdk fdk_aac;
|
||||
|
||||
propagatedBuildInputs = [ simde ];
|
||||
|
||||
# Copied from the obs-linuxbrowser
|
||||
postUnpack = lib.optionalString browserSupport ''
|
||||
ln -s ${cef} cef
|
||||
|
||||
@@ -60,8 +60,6 @@
|
||||
|
||||
obs-mute-filter = callPackage ./obs-mute-filter.nix { };
|
||||
|
||||
obs-ndi = qt6Packages.callPackage ./obs-ndi { };
|
||||
|
||||
obs-noise = callPackage ./obs-noise.nix { };
|
||||
|
||||
obs-pipewire-audio-capture = callPackage ./obs-pipewire-audio-capture.nix { };
|
||||
@@ -96,8 +94,6 @@
|
||||
|
||||
obs-tuna = qt6Packages.callPackage ./obs-tuna { };
|
||||
|
||||
obs-urlsource = qt6Packages.callPackage ./obs-urlsource.nix { };
|
||||
|
||||
obs-vaapi = callPackage ./obs-vaapi { };
|
||||
|
||||
obs-vertical-canvas = qt6Packages.callPackage ./obs-vertical-canvas.nix { };
|
||||
|
||||
@@ -6,23 +6,22 @@
|
||||
pkg-config,
|
||||
ninja,
|
||||
obs-studio,
|
||||
libuiohook,
|
||||
qtbase,
|
||||
xorg,
|
||||
libxkbcommon,
|
||||
libxkbfile,
|
||||
SDL2,
|
||||
sdl3,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "obs-input-overlay";
|
||||
version = "5.0.6";
|
||||
version = "5.1.0-unstable-2025-09-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "univrsal";
|
||||
repo = "input-overlay";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-ju4u7hhx+hTuq7Oh0DBPV8RRM8zqyyvYV74KymU0+2c=";
|
||||
rev = "4d62e7d0c55f8ff62c3a0e7b1a8f3092086b23b7";
|
||||
hash = "sha256-cUULaOoV4fffEvsHkcG3lnFCIHSvnv3LHg+SDuuVLao=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -34,9 +33,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
buildInputs = [
|
||||
obs-studio
|
||||
libuiohook
|
||||
qtbase
|
||||
SDL2
|
||||
sdl3
|
||||
xorg.libX11
|
||||
xorg.libXau
|
||||
xorg.libXdmcp
|
||||
@@ -57,6 +55,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
sed -i '/set(CMAKE_CXX_FLAGS "-march=native")/d' 'source/CMakeLists.txt'
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
# Remove broken uiohook development files
|
||||
rm -r $out/lib/cmake $out/lib/pkgconfig
|
||||
'';
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
obs-studio,
|
||||
cmake,
|
||||
qtbase,
|
||||
ndi,
|
||||
curl,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "obs-ndi";
|
||||
version = "4.14.1";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
qtbase
|
||||
];
|
||||
buildInputs = [
|
||||
obs-studio
|
||||
qtbase
|
||||
ndi
|
||||
curl
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Palakis";
|
||||
repo = "obs-ndi";
|
||||
rev = version;
|
||||
sha256 = "sha256-ex/fZmZpFM6GTKNBQClzSf6Ns0Yts5+0PAmf5mIQCwc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./hardcode-ndi-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Add path (variable added in hardcode-ndi-path.patch
|
||||
sed -i -e s,@NDI@,${ndi},g src/plugin-main.cpp
|
||||
|
||||
# Replace bundled NDI SDK with the upstream version
|
||||
# (This fixes soname issues)
|
||||
rm -rf lib/ndi
|
||||
ln -s ${ndi}/include lib/ndi
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DENABLE_QT=ON" ];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Network A/V plugin for OBS Studio";
|
||||
homepage = "https://github.com/Palakis/obs-ndi";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ jshcmpbll ];
|
||||
platforms = platforms.linux;
|
||||
hydraPlatforms = ndi.meta.hydraPlatforms;
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
diff --git a/src/plugin-main.cpp b/src/plugin-main.cpp
|
||||
index 0d94add..617af73 100644
|
||||
--- a/src/plugin-main.cpp
|
||||
+++ b/src/plugin-main.cpp
|
||||
@@ -244,10 +244,7 @@ const NDIlib_v4 *load_ndilib()
|
||||
if (!path.isEmpty()) {
|
||||
locations << path;
|
||||
}
|
||||
-#if defined(__linux__) || defined(__APPLE__)
|
||||
- locations << "/usr/lib";
|
||||
- locations << "/usr/local/lib";
|
||||
-#endif
|
||||
+ locations << "@NDI@/lib";
|
||||
for (auto location : locations) {
|
||||
path = QDir::cleanPath(
|
||||
QDir(location).absoluteFilePath(NDILIB_LIBRARY_NAME));
|
||||
@@ -1,95 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
curl,
|
||||
git,
|
||||
obs-studio,
|
||||
pugixml,
|
||||
qtbase,
|
||||
writeScript,
|
||||
}:
|
||||
|
||||
let
|
||||
websocketpp = fetchFromGitHub {
|
||||
owner = "zaphoyd";
|
||||
repo = "websocketpp";
|
||||
rev = "0.8.2";
|
||||
sha256 = "sha256-9fIwouthv2GcmBe/UPvV7Xn9P2o0Kmn2hCI4jCh0hPM=";
|
||||
};
|
||||
|
||||
lexbor = fetchFromGitHub {
|
||||
owner = "lexbor";
|
||||
repo = "lexbor";
|
||||
rev = "v2.3.0";
|
||||
sha256 = "sha256-s5fZWBhXC0fuHIUk1YX19bHagahOtSLlKQugyHCIlgI=";
|
||||
};
|
||||
|
||||
asio = fetchFromGitHub {
|
||||
owner = "chriskohlhoff";
|
||||
repo = "asio";
|
||||
rev = "asio-1-28-0";
|
||||
sha256 = "sha256-dkiUdR8FgDnnqdptaJjE4rvNlgpC5HZl6SQQ5Di2C2s=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "obs-urlsource";
|
||||
version = "0.3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "locaal-ai";
|
||||
repo = "obs-urlsource";
|
||||
rev = version;
|
||||
sha256 = "sha256-ZWwD8jJkL1rAUeanD4iChcgpnJaC5pPo36Ot36XOSx8=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
git
|
||||
];
|
||||
buildInputs = [
|
||||
curl
|
||||
obs-studio
|
||||
pugixml
|
||||
qtbase
|
||||
];
|
||||
dontWrapQtApps = true;
|
||||
|
||||
# Update websocketpp and lexabor configurations to use pre-fetched sources
|
||||
postPatch = ''
|
||||
sed -i 's|URL .*|SOURCE_DIR "${websocketpp}"\n DOWNLOAD_COMMAND ""|' cmake/FetchWebsocketpp.cmake
|
||||
sed -i \
|
||||
-e 's|GIT_REPOSITORY .*|SOURCE_DIR "${lexbor}"|' \
|
||||
-e 's|GIT_TAG .*|DOWNLOAD_COMMAND ""\n UPDATE_COMMAND ""|' \
|
||||
cmake/BuildLexbor.cmake
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm -rf $out/lib/cmake
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-I${websocketpp}"
|
||||
"-I${asio}/asio/include"
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
# Prevent deprecation warnings from failing the build
|
||||
(lib.cmakeOptionType "string" "CMAKE_CXX_FLAGS" "-Wno-error=deprecated-declarations")
|
||||
(lib.cmakeBool "ENABLE_QT" true)
|
||||
(lib.cmakeBool "USE_SYSTEM_CURL" true)
|
||||
(lib.cmakeBool "USE_SYSTEM_PUGIXML" true)
|
||||
(lib.cmakeBool "CMAKE_COMPILE_WARNING_AS_ERROR" false)
|
||||
"-Wno-dev"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "OBS plugin to fetch data from a URL or file, connect to an API or AI service, parse responses and display text, image or audio on scene";
|
||||
homepage = "https://github.com/locaal-ai/obs-urlsource";
|
||||
maintainers = with maintainers; [ flexiondotorg ];
|
||||
license = licenses.gpl2Only;
|
||||
inherit (obs-studio.meta) platforms;
|
||||
};
|
||||
}
|
||||
@@ -20,6 +20,13 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-Bg1n1yV4JzNFEXFNayNa1exsSZhmRJ0RLHDjLWmqGZE=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace \
|
||||
src/source.hpp src/source.cpp src/source_generic.cpp \
|
||||
src/source_avx2.cpp src/source_avx.cpp \
|
||||
--replace circlebuf deque
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
|
||||
Reference in New Issue
Block a user