1{
2 lib,
3 buildLua,
4 fetchFromGitHub,
5 gitUpdater,
6}:
7buildLua rec {
8 pname = "simple-mpv-ui";
9 version = "3.0.0";
10
11 src = fetchFromGitHub {
12 owner = "open-dynaMIX";
13 repo = "simple-mpv-webui";
14 rev = "v${version}";
15 hash = "sha256-I8lwpo3Hfpy3UnPMmHEJCdArVQnNL245NkxsYVmnMF0=";
16 sparseCheckout = [
17 "main.lua"
18 "webui-page"
19 ];
20 };
21 passthru.updateScript = gitUpdater { rev-prefix = "v"; };
22
23 postInstall = ''
24 rm -f $out/share/mpv/scripts/webui/setup.cfg
25 '';
26
27 scriptPath = ".";
28 passthru.scriptName = "webui";
29
30 meta = with lib; {
31 description = "Web based user interface with controls for the mpv mediaplayer";
32 homepage = "https://github.com/open-dynaMIX/simple-mpv-webui";
33 maintainers = with maintainers; [
34 cript0nauta
35 zopieux
36 ];
37 longDescription = ''
38 You can access the webui when accessing http://127.0.0.1:8080 or
39 http://[::1]:8080 in your webbrowser. By default it listens on
40 0.0.0.0:8080 and [::0]:8080
41 '';
42 license = licenses.mit;
43 };
44}