about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix
blob: 874263f7b2d20499ac4be0c6610dde77e65e6bd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ lib, buildLua, fetchFromGitHub, unstableGitUpdater, yt-dlp }:

buildLua rec {
  pname = "mpv-playlistmanager";
  version = "unstable-2023-11-28";

  src = fetchFromGitHub {
    owner = "jonniek";
    repo = "mpv-playlistmanager";
    rev = "579490c7ae1becc129736b7632deec4f3fb90b99";
    hash = "sha256-swOtoB8UV/HPTpQRGXswAfUYsyC2Nj/QRIkGP8X1jk0=";
  };
  passthru.updateScript = unstableGitUpdater {};

  postPatch = ''
    substituteInPlace playlistmanager.lua \
      --replace 'youtube_dl_executable = "youtube-dl",' \
      'youtube_dl_executable = "${lib.getBin yt-dlp}/bin/yt-dlp"',
  '';

  meta = with lib; {
    description = "Mpv lua script to create and manage playlists";
    homepage = "https://github.com/jonniek/mpv-playlistmanager";
    license = licenses.unlicense;
    maintainers = with maintainers; [ lunik1 ];
  };
}