about summary refs log tree commit diff
path: root/pkgs/applications/video/obs-studio
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-10-24 04:31:44 +0200
committerGitHub <noreply@github.com>2023-10-24 04:31:44 +0200
commit3a61a71433c18ec21c7227d11623222c9f14c2fc (patch)
tree69e578be0b943efdebd731eb6ffdf69adcd7a13a /pkgs/applications/video/obs-studio
parent74222b8558afe39d43c3f88bfb3e13b1af744ab0 (diff)
parenta2a894536e29863fac63c176a3987666c36879c6 (diff)
downloadnixlib-3a61a71433c18ec21c7227d11623222c9f14c2fc.tar
nixlib-3a61a71433c18ec21c7227d11623222c9f14c2fc.tar.gz
nixlib-3a61a71433c18ec21c7227d11623222c9f14c2fc.tar.bz2
nixlib-3a61a71433c18ec21c7227d11623222c9f14c2fc.tar.lz
nixlib-3a61a71433c18ec21c7227d11623222c9f14c2fc.tar.xz
nixlib-3a61a71433c18ec21c7227d11623222c9f14c2fc.tar.zst
nixlib-3a61a71433c18ec21c7227d11623222c9f14c2fc.zip
Merge pull request #259216 from materusPL/materus/obs-studio-libcef-link
obs-studio: symlink libcef instead of copy
Diffstat (limited to 'pkgs/applications/video/obs-studio')
-rw-r--r--pkgs/applications/video/obs-studio/default.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix
index 8b3866d624bf..fee8325bf6d5 100644
--- a/pkgs/applications/video/obs-studio/default.nix
+++ b/pkgs/applications/video/obs-studio/default.nix
@@ -118,12 +118,12 @@ stdenv.mkDerivation rec {
   postUnpack = ''
     mkdir -p cef/Release cef/Resources cef/libcef_dll_wrapper/
     for i in ${libcef}/share/cef/*; do
-      cp -r $i cef/Release/
-      cp -r $i cef/Resources/
+      ln -s $i cef/Release/
+      ln -s $i cef/Resources/
     done
-    cp -r ${libcef}/lib/libcef.so cef/Release/
-    cp -r ${libcef}/lib/libcef_dll_wrapper.a cef/libcef_dll_wrapper/
-    cp -r ${libcef}/include cef/
+    ln -s ${libcef}/lib/libcef.so cef/Release/
+    ln -s ${libcef}/lib/libcef_dll_wrapper.a cef/libcef_dll_wrapper/
+    ln -s ${libcef}/include cef/
   '';
 
   cmakeFlags = [
@@ -145,6 +145,9 @@ stdenv.mkDerivation rec {
       blackmagic-desktop-video
     ];
   in ''
+    # Remove libcef before patchelf, otherwise it will fail
+    rm $out/lib/obs-plugins/libcef.so
+
     qtWrapperArgs+=(
       --prefix LD_LIBRARY_PATH : "$out/lib:${lib.makeLibraryPath wrapperLibraries}"
       ''${gappsWrapperArgs[@]}
@@ -154,6 +157,9 @@ stdenv.mkDerivation rec {
   postFixup = lib.optionalString stdenv.isLinux ''
     addOpenGLRunpath $out/lib/lib*.so
     addOpenGLRunpath $out/lib/obs-plugins/*.so
+
+    # Link libcef again after patchelfing other libs
+    ln -s ${libcef}/lib/libcef.so $out/lib/obs-plugins/libcef.so
   '';
 
   meta = with lib; {