obs-studio: add 28.0.3 (parallel to 27.x)

This commit is contained in:
Sebastian Sellmeier 2022-10-05 12:36:25 +02:00
parent 52593f7a50
commit 9f7914afa2
No known key found for this signature in database
GPG Key ID: 51E2BE0CCC826F98
7 changed files with 79 additions and 74 deletions

View File

@ -0,0 +1,7 @@
{ callPackage, qtx11extras, ... } @ args:
callPackage ./generic.nix (args // {
version = "27.2.4";
sha256 = "sha256-OiSejQovSmhItrnrQlcVp9PCDRgAhuxTinSpXbH8bo0=";
extraBuildInputs = [ qtx11extras ];
})

View File

@ -0,0 +1,22 @@
{ callPackage
, libajantv2
, librist
, srt
, qtwayland
, ...
} @ args:
callPackage ./generic.nix (args // {
version = "28.0.3";
sha256 = "sha256-+4H1BjEgxqkAEvRyr2Tg3wXutnMvlYQEdT5jz644fMA=";
extraPatches = [ ./Provide-runtime-plugin-destination-as-relative-path.patch ];
extraBuildInputs = [
libajantv2
librist
srt
qtwayland
];
extraCMakeFlags = [
"-DENABLE_JACK=ON"
];
})

View File

@ -0,0 +1,26 @@
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

View File

@ -1,7 +1,11 @@
{ config
{ version
, sha256
, extraPatches ? [ ]
, extraBuildInputs ? [ ]
, extraCMakeFlags ? [ ]
, config
, lib
, stdenv
, mkDerivation
, fetchFromGitHub
, addOpenGLRunpath
, cmake
@ -13,7 +17,6 @@
, libpthreadstubs
, libXdmcp
, qtbase
, qtx11extras
, qtsvg
, speex
, libv4l
@ -38,34 +41,37 @@
, pipewireSupport ? stdenv.isLinux
, pipewire
, libdrm
, wrapQtAppsHook
, ...
}:
let
inherit (lib) optional optionals;
in
mkDerivation rec {
stdenv.mkDerivation rec {
pname = "obs-studio";
version = "27.2.4";
inherit version;
src = fetchFromGitHub {
owner = "obsproject";
repo = "obs-studio";
rev = version;
sha256 = "sha256-OiSejQovSmhItrnrQlcVp9PCDRgAhuxTinSpXbH8bo0=";
inherit sha256;
fetchSubmodules = true;
};
patches = [
# Lets obs-browser build against CEF 90.1.0+
./Enable-file-access-and-universal-access-for-file-URL.patch
];
] ++ extraPatches;
nativeBuildInputs = [
addOpenGLRunpath
cmake
pkg-config
wrapGAppsHook
wrapQtAppsHook
]
++ optional scriptingSupport swig;
@ -81,7 +87,6 @@ mkDerivation rec {
libpthreadstubs
libXdmcp
qtbase
qtx11extras
qtsvg
speex
wayland
@ -90,6 +95,7 @@ mkDerivation rec {
mbedtls
pciutils
]
++ extraBuildInputs
++ optionals scriptingSupport [ luajit python3 ]
++ optional alsaSupport alsa-lib
++ optional pulseaudioSupport libpulseaudio
@ -117,7 +123,7 @@ mkDerivation rec {
# Add support for browser source
"-DBUILD_BROWSER=ON"
"-DCEF_ROOT_DIR=../../cef"
];
] ++ extraCMakeFlags;
dontWrapGApps = true;
preFixup = ''

View File

@ -28,7 +28,7 @@
obs-vkcapture32 = pkgsi686Linux.obs-studio-plugins.obs-vkcapture;
};
obs-websocket = libsForQt5.callPackage ./obs-websocket.nix { };
obs-websocket = throw "obs-websocket has been removed: Functionality has been integrated into obs-studio itself.";
wlrobs = callPackage ./wlrobs.nix { };
}

View File

@ -1,63 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, qtbase
, qtsvg
, obs-studio
, asio_1_10
, websocketpp
, nlohmann_json
}:
stdenv.mkDerivation rec {
pname = "obs-websocket";
# We have updated to the alpha version when OBS Studio 27.2 was
# released, because this is the only version of obs-websocket that
# builds against the new OBS Studio.
version = "5.0.0-alpha3";
src = fetchFromGitHub {
owner = "Palakis";
repo = "obs-websocket";
rev = version;
sha256 = "Lr6SBj5rRTAWmn9Tnlu4Sl7SAkOCRCTP6sFWSp4xB+I=";
fetchSubmodules = true;
};
patches = [
# This patch can be dropped when obs-websocket is updated to the
# next version.
(fetchpatch {
url = "https://github.com/obsproject/obs-websocket/commit/13c7b83c34eb67b2ee80af05071d81f10d0d2997.patch";
sha256 = "TNap/T8+058vhfWzRRr4vmlblFk9tHMUNyG6Ob5PwiM=";
name = "obs-addref-werror-fix.patch";
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [
qtbase
qtsvg
obs-studio
asio_1_10
websocketpp
nlohmann_json
];
dontWrapQtApps = true;
cmakeFlags = [
"-DLIBOBS_INCLUDE_DIR=${obs-studio.src}/libobs"
];
meta = with lib; {
description = "Remote-control OBS Studio through WebSockets";
homepage = "https://github.com/Palakis/obs-websocket";
maintainers = with maintainers; [ erdnaxe ];
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" "i686-linux" ];
};
}

View File

@ -30768,9 +30768,16 @@ with pkgs;
gnome-obfuscate = callPackage ../applications/graphics/gnome-obfuscate { };
obs-studio = libsForQt5.callPackage ../applications/video/obs-studio {
obs-studio27 = libsForQt5.callPackage ../applications/video/obs-studio/27.nix {
ffmpeg_4 = ffmpeg-full;
};
obs-studio28 = qt6Packages.callPackage ../applications/video/obs-studio/28.nix {
ffmpeg_4 = ffmpeg-full;
};
obs-studio = obs-studio28;
obs-studio-plugins = recurseIntoAttrs (callPackage ../applications/video/obs-studio/plugins {});
wrapOBS = callPackage ../applications/video/obs-studio/wrapper.nix {};