summary refs log tree commit diff
path: root/pkgs/applications/video/mpv/wrapper.nix
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-06-07 09:02:13 +0300
committerProfpatsch <mail@profpatsch.de>2020-06-11 17:18:23 +0200
commitd60b5aaa2fbc68fa1609c30ee2f805f575c4a3f5 (patch)
tree9e1e211e58da9d60c74220d10cefe4ef2d1e005b /pkgs/applications/video/mpv/wrapper.nix
parentee540d4ff709e63cfcdd7a6dfb0cce803a848624 (diff)
downloadnixpkgs-d60b5aaa2fbc68fa1609c30ee2f805f575c4a3f5.tar
nixpkgs-d60b5aaa2fbc68fa1609c30ee2f805f575c4a3f5.tar.gz
nixpkgs-d60b5aaa2fbc68fa1609c30ee2f805f575c4a3f5.tar.bz2
nixpkgs-d60b5aaa2fbc68fa1609c30ee2f805f575c4a3f5.tar.lz
nixpkgs-d60b5aaa2fbc68fa1609c30ee2f805f575c4a3f5.tar.xz
nixpkgs-d60b5aaa2fbc68fa1609c30ee2f805f575c4a3f5.tar.zst
nixpkgs-d60b5aaa2fbc68fa1609c30ee2f805f575c4a3f5.zip
wrapMpv: Use lib.strings.escapeShellArgs
Instead of manually quoting the strings, use the library function to do
it more reliably.
Diffstat (limited to 'pkgs/applications/video/mpv/wrapper.nix')
-rw-r--r--pkgs/applications/video/mpv/wrapper.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/applications/video/mpv/wrapper.nix b/pkgs/applications/video/mpv/wrapper.nix
index 1658f922ab3..ad6383046b1 100644
--- a/pkgs/applications/video/mpv/wrapper.nix
+++ b/pkgs/applications/video/mpv/wrapper.nix
@@ -32,10 +32,10 @@ let
     # All arguments besides the input and output binaries (${mpv}/bin/mpv and
     # $out/bin/mpv). These are used by the darwin specific makeWrapper call
     # used to wrap $out/Applications/mpv.app/Contents/MacOS/mpv as well.
-    mostMakeWrapperArgs = builtins.concatStringsSep " " ([ "--argv0" "'$0'"
+    mostMakeWrapperArgs = lib.strings.escapeShellArgs ([ "--argv0" "'$0'"
       # These are always needed (TODO: Explain why)
-      "--prefix" "LUA_CPATH" "\\;" "${mpv.luaEnv}/lib/lua/${mpv.lua.luaversion}/\\?.so"
-      "--prefix" "LUA_PATH" "\\;" "${mpv.luaEnv}/share/lua/${mpv.lua.luaversion}/\\?.lua"
+      "--prefix" "LUA_CPATH" ";" "${mpv.luaEnv}/lib/lua/${mpv.lua.luaversion}/?.so"
+      "--prefix" "LUA_PATH" ";" "${mpv.luaEnv}/share/lua/${mpv.lua.luaversion}/?.lua"
     ] ++ lib.optionals mpv.vapoursynthSupport [
       "--prefix" "PYTHONPATH" ":" "${mpv.vapoursynth}/lib/${mpv.vapoursynth.python3.sitePackages}"
     ] ++ lib.optionals (binPath != "") [
@@ -52,7 +52,7 @@ let
       ) scripts
     )) ++ extraMakeWrapperArgs)
     ;
-    umpvWrapperArgs = builtins.concatStringsSep " " ([
+    umpvWrapperArgs = lib.strings.escapeShellArgs ([
       "--argv0" "'$0'"
       "--set" "MPV" "$out/bin/mpv"
     ] ++ extraUmpvWrapperArgs)