about summary refs log tree commit diff
path: root/pkgs/applications/video/obs-studio
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2023-07-11 13:09:23 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2023-08-02 12:37:36 +0200
commit9bf10ac3c54d6cb5a1df732b7711773180ea4012 (patch)
treef283947fa1e3459447277971e854bc1252cdf6dd /pkgs/applications/video/obs-studio
parent9cbab01d6ff88a1950f1c44ba56e5f109c146c91 (diff)
downloadnixlib-9bf10ac3c54d6cb5a1df732b7711773180ea4012.tar
nixlib-9bf10ac3c54d6cb5a1df732b7711773180ea4012.tar.gz
nixlib-9bf10ac3c54d6cb5a1df732b7711773180ea4012.tar.bz2
nixlib-9bf10ac3c54d6cb5a1df732b7711773180ea4012.tar.lz
nixlib-9bf10ac3c54d6cb5a1df732b7711773180ea4012.tar.xz
nixlib-9bf10ac3c54d6cb5a1df732b7711773180ea4012.tar.zst
nixlib-9bf10ac3c54d6cb5a1df732b7711773180ea4012.zip
obs-studio: 29.0.2 -> 29.1.3
Co-authored-by: matthewcroughan <matt@croughan.sh>
Co-authored-by: materus <materus@podkos.pl>
Diffstat (limited to 'pkgs/applications/video/obs-studio')
-rw-r--r--pkgs/applications/video/obs-studio/Provide-runtime-plugin-destination-as-relative-path.patch26
-rw-r--r--pkgs/applications/video/obs-studio/default.nix22
-rw-r--r--pkgs/applications/video/obs-studio/fix-nix-plugin-path.patch13
3 files changed, 25 insertions, 36 deletions
diff --git a/pkgs/applications/video/obs-studio/Provide-runtime-plugin-destination-as-relative-path.patch b/pkgs/applications/video/obs-studio/Provide-runtime-plugin-destination-as-relative-path.patch
deleted file mode 100644
index b39cb04a899c..000000000000
--- a/pkgs/applications/video/obs-studio/Provide-runtime-plugin-destination-as-relative-path.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
-index 790583cd5..763cf3548 100644
---- a/libobs/CMakeLists.txt
-+++ b/libobs/CMakeLists.txt
-@@ -455,6 +455,8 @@ elseif(OS_POSIX)
-     libobs PROPERTIES BUILD_RPATH "$<TARGET_FILE_DIR:OBS::libobs-opengl>")
- endif()
- 
-+string(REGEX REPLACE "^${OBS_INSTALL_PREFIX}" "" OBS_PLUGIN_DESTINATION_RELATIVE ${OBS_PLUGIN_DESTINATION})
-+
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/obsconfig.h.in
-                ${CMAKE_BINARY_DIR}/config/obsconfig.h)
- 
-diff --git a/libobs/obsconfig.h.in b/libobs/obsconfig.h.in
-index 4a664285a..5cff2ca53 100644
---- a/libobs/obsconfig.h.in
-+++ b/libobs/obsconfig.h.in
-@@ -13,7 +13,7 @@
- #define OBS_VERSION_CANONICAL "@OBS_VERSION_CANONICAL@"
- #define OBS_DATA_PATH "@OBS_DATA_PATH@"
- #define OBS_INSTALL_PREFIX "@OBS_INSTALL_PREFIX@"
--#define OBS_PLUGIN_DESTINATION "@OBS_PLUGIN_DESTINATION@"
-+#define OBS_PLUGIN_DESTINATION "@OBS_PLUGIN_DESTINATION_RELATIVE@"
- #define OBS_QT_VERSION @_QT_VERSION@
- 
- #cmakedefine LINUX_PORTABLE
diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix
index 286fc8fcc952..c901b06e41a3 100644
--- a/pkgs/applications/video/obs-studio/default.nix
+++ b/pkgs/applications/video/obs-studio/default.nix
@@ -25,7 +25,7 @@
 , wrapGAppsHook
 , scriptingSupport ? true
 , luajit
-, swig
+, swig4
 , python3
 , alsaSupport ? stdenv.isLinux
 , alsa-lib
@@ -42,6 +42,9 @@
 , srt
 , qtwayland
 , wrapQtAppsHook
+, nlohmann_json
+, websocketpp
+, asio
 }:
 
 let
@@ -50,20 +53,20 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "obs-studio";
-  version = "29.0.2";
+  version = "29.1.3";
 
   src = fetchFromGitHub {
     owner = "obsproject";
     repo = "obs-studio";
     rev = version;
-    sha256 = "sha256-TIUSjyPEsKRNTSLQXuLJGEgD989hJ5GhOsqJ4nkKVsY=";
+    sha256 = "sha256-D0DPueMtopwz5rLgM8QcPT7DgTKcJKQHnst69EY9V6Q=";
     fetchSubmodules = true;
   };
 
   patches = [
     # Lets obs-browser build against CEF 90.1.0+
     ./Enable-file-access-and-universal-access-for-file-URL.patch
-    ./Provide-runtime-plugin-destination-as-relative-path.patch
+    ./fix-nix-plugin-path.patch
   ];
 
   nativeBuildInputs = [
@@ -73,7 +76,7 @@ stdenv.mkDerivation rec {
     wrapGAppsHook
     wrapQtAppsHook
   ]
-  ++ optional scriptingSupport swig;
+  ++ optional scriptingSupport swig4;
 
   buildInputs = [
     curl
@@ -99,6 +102,9 @@ stdenv.mkDerivation rec {
     libva
     srt
     qtwayland
+    nlohmann_json
+    websocketpp
+    asio
   ]
   ++ optionals scriptingSupport [ luajit python3 ]
   ++ optional alsaSupport alsa-lib
@@ -117,11 +123,7 @@ stdenv.mkDerivation rec {
     cp -r ${libcef}/include cef/
   '';
 
-  # obs attempts to dlopen libobs-opengl, it fails unless we make sure
-  # DL_OPENGL is an explicit path. Not sure if there's a better way
-  # to handle this.
   cmakeFlags = [
-    "-DCMAKE_CXX_FLAGS=-DDL_OPENGL=\\\"$(out)/lib/libobs-opengl.so\\\""
     "-DOBS_VERSION_OVERRIDE=${version}"
     "-Wno-dev" # kill dev warnings that are useless for packaging
     # Add support for browser source
@@ -133,7 +135,7 @@ stdenv.mkDerivation rec {
   dontWrapGApps = true;
   preFixup = ''
     qtWrapperArgs+=(
-      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libX11 libvlc ]}"
+      --prefix LD_LIBRARY_PATH : "$out/lib:${lib.makeLibraryPath [ xorg.libX11 libvlc ]}"
       ''${gappsWrapperArgs[@]}
     )
   '';
diff --git a/pkgs/applications/video/obs-studio/fix-nix-plugin-path.patch b/pkgs/applications/video/obs-studio/fix-nix-plugin-path.patch
new file mode 100644
index 000000000000..d2c08c308bce
--- /dev/null
+++ b/pkgs/applications/video/obs-studio/fix-nix-plugin-path.patch
@@ -0,0 +1,13 @@
+diff --git a/libobs/obs-nix.c b/libobs/obs-nix.c
+index 36aac7097..801cec788 100644
+--- a/libobs/obs-nix.c
++++ b/libobs/obs-nix.c
+@@ -56,7 +56,7 @@ const char *get_module_extension(void)
+ #define FLATPAK_PLUGIN_PATH "/app/plugins"
+ 
+ static const char *module_bin[] = {
+-	OBS_INSTALL_PREFIX "/" OBS_PLUGIN_DESTINATION,
++	OBS_PLUGIN_DESTINATION,
+ 	"../../obs-plugins/" BIT_STRING,
+ 	FLATPAK_PLUGIN_PATH "/" OBS_PLUGIN_DESTINATION,
+ };