about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/mpv/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/video/mpv/scripts')
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/scripts/default.nix1
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix4
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix9
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/scripts/visualizer.nix34
4 files changed, 44 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix
index 1a2bb9260840..62c4e8bf9aa0 100644
--- a/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix
+++ b/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix
@@ -20,6 +20,7 @@ lib.recurseIntoAttrs
     thumbfast = callPackage ./thumbfast.nix { };
     thumbnail = callPackage ./thumbnail.nix { };
     uosc = callPackage ./uosc.nix { };
+    visualizer = callPackage ./visualizer.nix { };
     vr-reversal = callPackage ./vr-reversal.nix { };
     webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { };
     cutter = callPackage ./cutter.nix { };
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix
index 063833297b98..4d7bb155f5cc 100644
--- a/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix
+++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix
@@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ glib mpv-unwrapped ];
 
+  postPatch = ''
+    substituteInPlace Makefile --replace 'PKG_CONFIG =' 'PKG_CONFIG ?='
+  '';
+
   installFlags = [ "SCRIPTS_DIR=$(out)/share/mpv/scripts" ];
 
   # Otherwise, the shared object isn't `strip`ped. See:
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix
index b59f9de38714..720fdaae5b3f 100644
--- a/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix
+++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix
@@ -2,18 +2,19 @@
 
 stdenvNoCC.mkDerivation rec {
   pname = "mpv-playlistmanager";
-  version = "unstable-2022-08-26";
+  version = "unstable-2023-08-09";
 
   src = fetchFromGitHub {
     owner = "jonniek";
     repo = "mpv-playlistmanager";
-    rev = "07393162f7f78f8188e976f616f1b89813cec741";
-    sha256 = "sha256-Vgh5F6c90ijp5LVrP2cdAOXo+QtJ9aXI9G/3C2HGqd4=";
+    rev = "e479cbc7e83a07c5444f335cfda13793681bcbd8";
+    sha256 = "sha256-Nh4g8uSkHWPjwl5wyqWtM+DW9fkEbmCcOsZa4eAF6Cs=";
   };
 
   postPatch = ''
     substituteInPlace playlistmanager.lua \
-      --replace "youtube-dl" "${lib.getBin yt-dlp}/bin/yt-dlp"
+      --replace 'youtube_dl_executable = "youtube-dl",' \
+      'youtube_dl_executable = "${lib.getBin yt-dlp}/bin/yt-dlp"',
   '';
 
   dontBuild = true;
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/visualizer.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/visualizer.nix
new file mode 100644
index 000000000000..a248b63d503a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/mpv/scripts/visualizer.nix
@@ -0,0 +1,34 @@
+{
+  lib,
+  stdenvNoCC,
+  fetchFromGitHub,
+}:
+stdenvNoCC.mkDerivation {
+  pname = "visualizer";
+  version = "unstable-2021-07-10";
+
+  src = fetchFromGitHub {
+    owner = "mfcc64";
+    repo = "mpv-scripts";
+    rev = "a0cd87eeb974a4602c5d8086b4051b5ab72f42e1";
+    sha256 = "1xgd1nd117lpj3ppynhgaa5sbkfm7l8n6c9a2fy8p07is2dkndrq";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/share/mpv/scripts
+    cp visualizer.lua $out/share/mpv/scripts
+    runHook postInstall
+  '';
+
+  passthru.scriptName = "visualizer.lua";
+
+  meta = with lib; {
+    description = "various audio visualization";
+    homepage = "https://github.com/mfcc64/mpv-scripts";
+    platforms = platforms.all;
+    maintainers = with maintainers; [kmein];
+  };
+}