From 593d64f975e4e7d9439562d3f857d85e8be66012 Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Sun, 14 Aug 2022 08:37:29 +0900 Subject: [PATCH] obs-studio: Fix wrapOBS double-including the built-in plugins --- maintainers/maintainer-list.nix | 9 +++++++++ pkgs/applications/video/obs-studio/default.nix | 2 +- pkgs/applications/video/obs-studio/wrapper.nix | 16 +++++++++++++--- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 0955354fa910..844266283f2c 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8481,6 +8481,15 @@ githubId = 9980864; name = "Max Hofer"; }; + miangraham = { + email = "miangraham@users.noreply.github.com"; + github = "miangraham"; + githubId = 704580; + name = "M. Ian Graham"; + keys = [{ + fingerprint = "8CE3 2906 516F C4D8 D373 308A E189 648A 55F5 9A9F"; + }]; + }; mic92 = { email = "joerg@thalheim.io"; matrix = "@mic92:nixos.dev"; diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix index 83514923331a..044967b2e526 100644 --- a/pkgs/applications/video/obs-studio/default.nix +++ b/pkgs/applications/video/obs-studio/default.nix @@ -140,7 +140,7 @@ mkDerivation rec { video content, efficiently ''; homepage = "https://obsproject.com"; - maintainers = with maintainers; [ jb55 MP2E V ]; + maintainers = with maintainers; [ jb55 MP2E V miangraham ]; license = licenses.gpl2Plus; platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ]; mainProgram = "obs"; diff --git a/pkgs/applications/video/obs-studio/wrapper.nix b/pkgs/applications/video/obs-studio/wrapper.nix index 80880d9318d9..3b98385a869e 100644 --- a/pkgs/applications/video/obs-studio/wrapper.nix +++ b/pkgs/applications/video/obs-studio/wrapper.nix @@ -6,7 +6,7 @@ symlinkJoin { name = "wrapped-${obs-studio.name}"; nativeBuildInputs = [ makeWrapper ]; - paths = [ obs-studio ] ++ plugins; + paths = [ obs-studio ]; postBuild = with lib; let @@ -14,11 +14,21 @@ symlinkJoin { pluginArguments = lists.concatMap (plugin: plugin.obsWrapperArguments or []) plugins; + pluginsJoined = symlinkJoin { + name = "obs-studio-plugins"; + paths = lists.map (plugin: "${plugin}/lib/obs-plugins") plugins; + }; + + pluginsDataJoined = symlinkJoin { + name = "obs-studio-plugins-data"; + paths = lists.map (plugin: "${plugin}/share/obs/obs-plugins") plugins; + }; + wrapCommand = [ "wrapProgram" "$out/bin/obs" - ''--set OBS_PLUGINS_PATH "$out/lib/obs-plugins"'' - ''--set OBS_PLUGINS_DATA_PATH "$out/share/obs/obs-plugins"'' + ''--set OBS_PLUGINS_PATH "${pluginsJoined}"'' + ''--set OBS_PLUGINS_DATA_PATH "${pluginsDataJoined}"'' ] ++ pluginArguments; in concatStringsSep " " wrapCommand;