tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
obs-studio: 31.1.2 -> 32.0.1
Franz Pletz
5 months ago
641f60cf
5bde53f2
+5
-37
2 changed files
expand all
collapse all
unified
split
pkgs
applications
video
obs-studio
Enable-file-access-and-universal-access-for-file-URL.patch
default.nix
-33
pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch
···
1
-
From 0de0a90f8fe5e1e48fa4ec7aa7c825ef88770f9d Mon Sep 17 00:00:00 2001
2
-
From: Ryan Foster <RytoEX@gmail.com>
3
-
Date: Mon, 9 Sep 2019 23:55:02 -0400
4
-
Subject: [PATCH] Enable file access and universal access for file URLs
5
-
6
-
When loading a local file, instead of disabling CEF's web security,
7
-
enable file access and universal access for file URLs. This should allow
8
-
local files to make CORS requests without completely disabling CEF's
9
-
security model.
10
-
---
11
-
obs-browser-source.cpp | 9 ++++++---
12
-
1 file changed, 6 insertions(+), 3 deletions(-)
13
-
14
-
diff --git a/obs-browser-source.cpp b/obs-browser-source.cpp
15
-
index 09b3017..1094340 100644
16
-
--- a/plugins/obs-browser/obs-browser-source.cpp
17
-
+++ b/plugins/obs-browser/obs-browser-source.cpp
18
-
@@ -239,9 +239,12 @@ bool BrowserSource::CreateBrowser()
19
-
20
-
#if ENABLE_LOCAL_FILE_URL_SCHEME && CHROME_VERSION_BUILD < 4430
21
-
if (is_local) {
22
-
- /* Disable web security for file:// URLs to allow
23
-
- * local content access to remote APIs */
24
-
- cefBrowserSettings.web_security = STATE_DISABLED;
25
-
+ /* Enable file access and universal access from file://
26
-
+ * URLs to allow local content access to remote APIs */
27
-
+ cefBrowserSettings.file_access_from_file_urls =
28
-
+ STATE_ENABLED;
29
-
+ cefBrowserSettings.universal_access_from_file_urls =
30
-
+ STATE_ENABLED;
31
-
}
32
-
#endif
33
-
auto browser = CefBrowserHost::CreateBrowserSync(
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
+5
-4
pkgs/applications/video/obs-studio/default.nix
···
59
libdatachannel,
60
libvpl,
61
qrcodegencpp,
0
62
nix-update-script,
63
extra-cmake-modules,
64
}:
···
82
in
83
stdenv.mkDerivation (finalAttrs: {
84
pname = "obs-studio";
85
-
version = "31.1.2";
86
87
src = fetchFromGitHub {
88
owner = "obsproject";
89
repo = "obs-studio";
90
rev = finalAttrs.version;
91
-
hash = "sha256-QZoIyjliVruDPZj8hzTABaDn+nCTVs5qQCdBLtSOKvI=";
92
fetchSubmodules = true;
93
};
94
95
separateDebugInfo = true;
96
97
patches = [
98
-
# Lets obs-browser build against CEF 90.1.0+
99
-
./Enable-file-access-and-universal-access-for-file-URL.patch
100
./fix-nix-plugin-path.patch
101
];
102
···
155
]
156
++ optional browserSupport cef
157
++ optional withFdk fdk_aac;
0
0
158
159
# Copied from the obs-linuxbrowser
160
postUnpack = lib.optionalString browserSupport ''
···
59
libdatachannel,
60
libvpl,
61
qrcodegencpp,
62
+
simde,
63
nix-update-script,
64
extra-cmake-modules,
65
}:
···
83
in
84
stdenv.mkDerivation (finalAttrs: {
85
pname = "obs-studio";
86
+
version = "32.0.1";
87
88
src = fetchFromGitHub {
89
owner = "obsproject";
90
repo = "obs-studio";
91
rev = finalAttrs.version;
92
+
hash = "sha256-99VAVV3hEMDI2R30OrX/in/9KtesUxMGOPg6yT5e4oM=";
93
fetchSubmodules = true;
94
};
95
96
separateDebugInfo = true;
97
98
patches = [
0
0
99
./fix-nix-plugin-path.patch
100
];
101
···
154
]
155
++ optional browserSupport cef
156
++ optional withFdk fdk_aac;
157
+
158
+
propagatedBuildInputs = [ simde ];
159
160
# Copied from the obs-linuxbrowser
161
postUnpack = lib.optionalString browserSupport ''