mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-24 14:10:17 +02:00
Merge pull request #184651 from PedroHLC/obs-gstreamer-0.3.4
obs-gstreamer: 0.3.3 -> 0.3.4
This commit is contained in:
commit
554304bff5
|
@ -10,22 +10,41 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "obs-gstreamer";
|
pname = "obs-gstreamer";
|
||||||
version = "0.3.3";
|
version = "0.3.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "fzwoch";
|
owner = "fzwoch";
|
||||||
repo = "obs-gstreamer";
|
repo = "obs-gstreamer";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-KhSBZcV2yILTf5+aNoYWDfNwPiJoyYPeIOQMDFvOusg=";
|
hash = "sha256-CDtWe4bx1M06nfqvVmIZaLQoKAsXFnG0Xy/mhiSbMgU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config meson ninja ];
|
nativeBuildInputs = [ pkg-config meson ninja ];
|
||||||
buildInputs = with gst_all_1; [ gstreamer gst-plugins-base obs-studio ];
|
buildInputs = with gst_all_1; [ gstreamer gst-plugins-base obs-studio ];
|
||||||
|
|
||||||
|
# - We need "getLib" instead of default derivation, otherwise it brings gstreamer-bin;
|
||||||
|
# - without gst-plugins-base it won't even show proper errors in logs;
|
||||||
|
# - Without gst-plugins-bad it won't find element "h264parse";
|
||||||
|
# - gst-vaapi adds "VA-API" to "Encoder type";
|
||||||
|
# - gst-plugins-ugly adds "x264" to "Encoder type";
|
||||||
|
# Tip: "could not link appsrc to videoconvert1" can mean a lot of things, enable GST_DEBUG=2 for help.
|
||||||
|
passthru.obsWrapperArguments =
|
||||||
|
let
|
||||||
|
gstreamerHook = package: "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${lib.getLib package}/lib/gstreamer-1.0";
|
||||||
|
in
|
||||||
|
with gst_all_1; builtins.map gstreamerHook [
|
||||||
|
gstreamer
|
||||||
|
gst-plugins-base
|
||||||
|
gst-plugins-bad
|
||||||
|
|
||||||
|
gst-plugins-ugly
|
||||||
|
gst-vaapi
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "An OBS Studio source, encoder and video filter plugin to use GStreamer elements/pipelines in OBS Studio";
|
description = "An OBS Studio source, encoder and video filter plugin to use GStreamer elements/pipelines in OBS Studio";
|
||||||
homepage = "https://github.com/fzwoch/obs-gstreamer";
|
homepage = "https://github.com/fzwoch/obs-gstreamer";
|
||||||
maintainers = with maintainers; [ ahuzik ];
|
maintainers = with maintainers; [ ahuzik pedrohlc ];
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ obs-studio, symlinkJoin, makeWrapper }:
|
{ lib, obs-studio, symlinkJoin, makeWrapper }:
|
||||||
|
|
||||||
{ plugins ? [] }:
|
{ plugins ? [] }:
|
||||||
|
|
||||||
|
@ -8,11 +8,19 @@ symlinkJoin {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
paths = [ obs-studio ] ++ plugins;
|
paths = [ obs-studio ] ++ plugins;
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = with lib;
|
||||||
wrapProgram $out/bin/obs \
|
let
|
||||||
--set OBS_PLUGINS_PATH "$out/lib/obs-plugins" \
|
# Some plugins needs extra environment, see obs-gstreamer for an example.
|
||||||
--set OBS_PLUGINS_DATA_PATH "$out/share/obs/obs-plugins"
|
pluginArguments =
|
||||||
'';
|
lists.concatMap (plugin: plugin.obsWrapperArguments or []) plugins;
|
||||||
|
|
||||||
|
wrapCommand = [
|
||||||
|
"wrapProgram"
|
||||||
|
"$out/bin/obs"
|
||||||
|
''--set OBS_PLUGINS_PATH "$out/lib/obs-plugins"''
|
||||||
|
''--set OBS_PLUGINS_DATA_PATH "$out/share/obs/obs-plugins"''
|
||||||
|
] ++ pluginArguments;
|
||||||
|
in concatStringsSep " " wrapCommand;
|
||||||
|
|
||||||
inherit (obs-studio) meta;
|
inherit (obs-studio) meta;
|
||||||
passthru = obs-studio.passthru // {
|
passthru = obs-studio.passthru // {
|
||||||
|
|
Loading…
Reference in a new issue