Skip to content

Commit

Permalink
mpvScripts.twitch-chat: init at 0-unstable-2024-06-23 (#368422)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbsds authored Jan 24, 2025
2 parents d9a7560 + 15a39f1 commit 3ceb791
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions pkgs/applications/video/mpv/scripts/twitch-chat.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
buildLua,
curl,
fetchFromGitHub,
lib,
nix-update-script,
}:
buildLua (finalAttrs: {
pname = "twitch-chat";
version = "0-unstable-2024-06-23";

src = fetchFromGitHub {
owner = "CrendKing";
repo = "mpv-twitch-chat";
rev = "bb0c2e84675f4f1e0c221c8e1d3516b60242b985";
hash = "sha256-WyNPUiAs5U/vrjNbAgyqkfoxh9rabLmuZ1zG5uZYxaw=";
};

installPhase = ''
runHook preInstall
install -D main.lua $out/share/mpv/scripts/twitch-chat.lua
runHook postInstall
'';

passthru.extraWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath [ curl ])
];

passthru.updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
};

meta = {
description = "Show Twitch chat messages as subtitles when watching Twitch VOD with mpv.";
homepage = "https://github.com/CrendKing/mpv-twitch-chat";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.naho ];
};
})

0 comments on commit 3ceb791

Please sign in to comment.