about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix
blob: ffc1e81eed5d0eea6a0d1638e46d44346b57001a (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 = "0-unstable-2024-02-26";

  src = fetchFromGitHub {
    owner = "jonniek";
    repo = "mpv-playlistmanager";
    rev = "1911dc053951169c98cfcfd9f44ef87d9122ca80";
    hash = "sha256-pcdOMhkivLF5B86aNuHrqj77DuYLAFGlwFwY7jxkDkE=";
  };
  passthru.updateScript = unstableGitUpdater {};

  postPatch = ''
    substituteInPlace playlistmanager.lua \
      --replace-fail 'youtube_dl_executable = "yt-dlp",' \
      'youtube_dl_executable = "${lib.getExe 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 ];
  };
}