Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpvScripts.twitch-chat: init at 0-unstable-2024-06-23 #368422

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions pkgs/applications/video/mpv/scripts/twitch-chat.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
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 { };

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 ];
};
})
Loading