diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-07-11 01:41:53 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-07-11 01:42:08 +0300 |
commit | f57fe6c2f92f4390ebad951fc39d7324a47487a7 (patch) | |
tree | ac0043d8dc5ec7234856fdc56a770e3388b5c7cf /pkgs/applications/video/simplescreenrecorder | |
parent | ec5ec3141105b6ca26bc32342c2273fc12b0fd52 (diff) | |
download | nixlib-f57fe6c2f92f4390ebad951fc39d7324a47487a7.tar nixlib-f57fe6c2f92f4390ebad951fc39d7324a47487a7.tar.gz nixlib-f57fe6c2f92f4390ebad951fc39d7324a47487a7.tar.bz2 nixlib-f57fe6c2f92f4390ebad951fc39d7324a47487a7.tar.lz nixlib-f57fe6c2f92f4390ebad951fc39d7324a47487a7.tar.xz nixlib-f57fe6c2f92f4390ebad951fc39d7324a47487a7.tar.zst nixlib-f57fe6c2f92f4390ebad951fc39d7324a47487a7.zip |
simplescreenrecorder: fix paths to LD_PRELOADed part
Diffstat (limited to 'pkgs/applications/video/simplescreenrecorder')
-rw-r--r-- | pkgs/applications/video/simplescreenrecorder/default.nix | 13 | ||||
-rw-r--r-- | pkgs/applications/video/simplescreenrecorder/fix-paths.patch | 35 |
2 files changed, 47 insertions, 1 deletions
diff --git a/pkgs/applications/video/simplescreenrecorder/default.nix b/pkgs/applications/video/simplescreenrecorder/default.nix index 3ea04a39393b..f50a41129adb 100644 --- a/pkgs/applications/video/simplescreenrecorder/default.nix +++ b/pkgs/applications/video/simplescreenrecorder/default.nix @@ -11,7 +11,18 @@ stdenv.mkDerivation rec { sha256 = "1d89ncspjd8c4mckf0nb6y3hrxpv4rjpbj868pznhvfmdgr5nvql"; }; - postPatch = "sed '1i#include <random>' -i src/Benchmark.cpp"; + patches = [ ./fix-paths.patch ]; + + postPatch = '' + # #455 + sed '1i#include <random>' -i src/Benchmark.cpp + + for i in scripts/ssr-glinject src/AV/Input/GLInjectInput.cpp; do + substituteInPlace $i \ + --subst-var out \ + --subst-var-by sh ${stdenv.shell} + done + ''; buildInputs = [ alsaLib ffmpeg libjack2 libX11 libXext libXfixes mesa pkgconfig diff --git a/pkgs/applications/video/simplescreenrecorder/fix-paths.patch b/pkgs/applications/video/simplescreenrecorder/fix-paths.patch new file mode 100644 index 000000000000..ba02240ce1f2 --- /dev/null +++ b/pkgs/applications/video/simplescreenrecorder/fix-paths.patch @@ -0,0 +1,35 @@ +diff --git a/scripts/ssr-glinject b/scripts/ssr-glinject +index 48be48d..5038d4c 100755 +--- a/scripts/ssr-glinject ++++ b/scripts/ssr-glinject +@@ -59,6 +59,6 @@ do + fi + done + +-echo "ssr-glinject: LD_PRELOAD = $LD_PRELOAD:libssr-glinject.so" ++echo "ssr-glinject: LD_PRELOAD = $LD_PRELOAD:@out@/lib/libssr-glinject.so" + echo "ssr-glinject: command = $@" +-LD_PRELOAD="$LD_PRELOAD:libssr-glinject.so" "$@" ++LD_PRELOAD="$LD_PRELOAD:@out@/lib/libssr-glinject.so" "$@" +diff --git a/src/AV/Input/GLInjectInput.cpp b/src/AV/Input/GLInjectInput.cpp +index 6b378f8..cbcf82b 100644 +--- a/src/AV/Input/GLInjectInput.cpp ++++ b/src/AV/Input/GLInjectInput.cpp +@@ -96,7 +96,7 @@ void GLInjectInput::SetCapturing(bool capturing) { + bool GLInjectInput::LaunchApplication(const QString& channel, bool relax_permissions, const QString& command, const QString& working_directory) { + + // prepare command +- QString full_command = "LD_PRELOAD=\"libssr-glinject.so\" "; ++ QString full_command = "LD_PRELOAD=\"@out@/lib/libssr-glinject.so\" "; + full_command += "SSR_CHANNEL=\"" + ShellEscape(channel) + "\" "; + if(relax_permissions) + full_command += "SSR_STREAM_RELAX_PERMISSIONS=1 "; +@@ -106,7 +106,7 @@ bool GLInjectInput::LaunchApplication(const QString& channel, bool relax_permiss + QStringList args; + args.push_back("-c"); + args.push_back(full_command); +- return QProcess::startDetached("/bin/sh", args, working_directory); ++ return QProcess::startDetached("@sh@", args, working_directory); + + } + |