about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/mpv
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/video/mpv')
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/default.nix9
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix33
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/wrapper.nix10
3 files changed, 44 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/applications/video/mpv/default.nix b/nixpkgs/pkgs/applications/video/mpv/default.nix
index 9cb39d681401..697a468f8908 100644
--- a/nixpkgs/pkgs/applications/video/mpv/default.nix
+++ b/nixpkgs/pkgs/applications/video/mpv/default.nix
@@ -1,6 +1,6 @@
 { config, stdenv, fetchurl, fetchFromGitHub, fetchpatch
 , addOpenGLRunpath, docutils, perl, pkgconfig, python3, wafHook, which
-, ffmpeg_4, freefont_ttf, freetype, libass, libpthreadstubs, mujs
+, ffmpeg, freefont_ttf, freetype, libass, libpthreadstubs, mujs
 , nv-codec-headers, lua, libuchardet, libiconv ? null
 , CoreFoundation, Cocoa, CoreAudio, MediaPlayer
 
@@ -39,7 +39,10 @@
 , libpngSupport      ? true,           libpng        ? null
 , pulseSupport       ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
 , rubberbandSupport  ? stdenv.isLinux, rubberband    ? null
-, sambaSupport       ? stdenv.isLinux, samba         ? null
+# NOTE: samba support should be removed on the next mpv release, see also:
+# https://github.com/NixOS/nixpkgs/pull/89145#issuecomment-636424362
+# Please remove this line on the next mpv release.
+, sambaSupport       ? false,          samba         ? null
 , screenSaverSupport ? true,           libXScrnSaver ? null
 , sdl2Support        ? true,           SDL2          ? null
 , sndioSupport       ? true,           sndio         ? null
@@ -152,7 +155,7 @@ in stdenv.mkDerivation rec {
     ++ optional swiftSupport swift;
 
   buildInputs = [
-    ffmpeg_4 freetype libass libpthreadstubs
+    ffmpeg freetype libass libpthreadstubs
     luaEnv libuchardet mujs
   ] ++ optional alsaSupport        alsaLib
     ++ optional archiveSupport     libarchive
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix
new file mode 100644
index 000000000000..d51434e241c9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix
@@ -0,0 +1,33 @@
+{ stdenv
+, fetchFromGitHub }:
+stdenv.mkDerivation rec {
+  pname = "simple-mpv-ui";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "open-dynaMIX";
+    repo = "simple-mpv-webui";
+    rev = "v${version}";
+    sha256 = "1glrnnl1slcl0ri0zs4j64lc9aa52p9ffh6av0d81fk95nm98917";
+  };
+
+  dontBuild = true;
+  installPhase = ''
+    mkdir -p $out/share/mpv/scripts
+    cp -r webui.lua webui-page $out/share/mpv/scripts/
+  '';
+  passthru.scriptName = "webui.lua";
+
+  meta = with stdenv.lib; {
+    description = "A web based user interface with controls for the mpv mediaplayer";
+    homepage = "https://github.com/open-dynaMIX/simple-mpv-webui";
+    maintainers = [ maintainers.cript0nauta ];
+    longDescription = ''
+      You can access the webui when accessing http://127.0.0.1:8080 or
+      http://[::1]:8080 in your webbrowser. By default it listens on
+      0.0.0.0:8080 and [::0]:8080
+    '';
+    license = licenses.mit;
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/video/mpv/wrapper.nix b/nixpkgs/pkgs/applications/video/mpv/wrapper.nix
index 1658f922ab3b..5b3ad7a98311 100644
--- a/nixpkgs/pkgs/applications/video/mpv/wrapper.nix
+++ b/nixpkgs/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,9 +52,9 @@ let
       ) scripts
     )) ++ extraMakeWrapperArgs)
     ;
-    umpvWrapperArgs = builtins.concatStringsSep " " ([
+    umpvWrapperArgs = lib.strings.escapeShellArgs ([
       "--argv0" "'$0'"
-      "--set" "MPV" "$out/bin/mpv"
+      "--set" "MPV" "${placeholder "out"}/bin/mpv"
     ] ++ extraUmpvWrapperArgs)
     ;
   in