Merge pull request #242814 from fpletz/pkgs/obs-studio-29.1.3
obs-studio: 29.0.2 -> 29.1.3
This commit is contained in:
commit
bc7eb664a5
|
@ -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
|
|
@ -21,11 +21,12 @@
|
|||
, xorg
|
||||
, pkg-config
|
||||
, libvlc
|
||||
, libGL
|
||||
, mbedtls
|
||||
, wrapGAppsHook
|
||||
, scriptingSupport ? true
|
||||
, luajit
|
||||
, swig
|
||||
, swig4
|
||||
, python3
|
||||
, alsaSupport ? stdenv.isLinux
|
||||
, alsa-lib
|
||||
|
@ -42,6 +43,9 @@
|
|||
, srt
|
||||
, qtwayland
|
||||
, wrapQtAppsHook
|
||||
, nlohmann_json
|
||||
, websocketpp
|
||||
, asio
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -50,20 +54,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 +77,7 @@ stdenv.mkDerivation rec {
|
|||
wrapGAppsHook
|
||||
wrapQtAppsHook
|
||||
]
|
||||
++ optional scriptingSupport swig;
|
||||
++ optional scriptingSupport swig4;
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
|
@ -99,6 +103,9 @@ stdenv.mkDerivation rec {
|
|||
libva
|
||||
srt
|
||||
qtwayland
|
||||
nlohmann_json
|
||||
websocketpp
|
||||
asio
|
||||
]
|
||||
++ optionals scriptingSupport [ luajit python3 ]
|
||||
++ optional alsaSupport alsa-lib
|
||||
|
@ -117,11 +124,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 +136,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 libGL ]}"
|
||||
''${gappsWrapperArgs[@]}
|
||||
)
|
||||
'';
|
||||
|
|
13
pkgs/applications/video/obs-studio/fix-nix-plugin-path.patch
Normal file
13
pkgs/applications/video/obs-studio/fix-nix-plugin-path.patch
Normal file
|
@ -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,
|
||||
};
|
|
@ -1,21 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, obs-studio }:
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, obs-studio }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "obs-source-record";
|
||||
version = "unstable-2022-11-10";
|
||||
version = "0.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "exeldro";
|
||||
repo = "obs-source-record";
|
||||
rev = "4a543d3577d56a27f5f2b9aa541a466b37dafde0";
|
||||
sha256 = "sha256-LoMgrWZ7r6lu2fisNvqrAiFvxWQQDE6lSxUHkMB/ZPY=";
|
||||
rev = version;
|
||||
sha256 = "sha256-H65uQ9HnKmHs52v3spG92ayeYH/TvmwcMoePMmBMqN8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix obs 29.1 compatibility
|
||||
(fetchpatch {
|
||||
url = "https://patch-diff.githubusercontent.com/raw/exeldro/obs-source-record/pull/83.diff";
|
||||
hash = "sha256-eWOjHHfoXZeoPtqvVyexSi/UQqHm8nu4FEEjma64Ly4=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [
|
||||
obs-studio
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_OUT_OF_TREE=On"
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue