From 641f60cfe3ab2b442bb021f5a855914b5138a597 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 29 Sep 2025 02:37:24 +0200 Subject: [PATCH] obs-studio: 31.1.2 -> 32.0.1 --- ...ss-and-universal-access-for-file-URL.patch | 33 ------------------- .../applications/video/obs-studio/default.nix | 9 ++--- 2 files changed, 5 insertions(+), 37 deletions(-) delete mode 100644 pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch diff --git a/pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch b/pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch deleted file mode 100644 index b0c9650ddb90..000000000000 --- a/pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0de0a90f8fe5e1e48fa4ec7aa7c825ef88770f9d Mon Sep 17 00:00:00 2001 -From: Ryan Foster -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( diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix index 06b0b1f64d0e..850d6b5a520d 100644 --- a/pkgs/applications/video/obs-studio/default.nix +++ b/pkgs/applications/video/obs-studio/default.nix @@ -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