1{
2 lib,
3 buildLua,
4 fetchFromGitHub,
5 makeFontsConf,
6 nix-update-script,
7}:
8buildLua (finalAttrs: {
9 pname = "mpv-osc-modern";
10 version = "1.1.1";
11
12 scriptPath = "modern.lua";
13 src = fetchFromGitHub {
14 owner = "maoiscat";
15 repo = "mpv-osc-modern";
16 rev = "v${finalAttrs.version}";
17 hash = "sha256-RMUy8UpSRSCEPAbnGLpJ2NjDsDdkjq8cNsdGwsQ5ANU=";
18 };
19
20 postInstall = ''
21 mkdir -p $out/share/fonts
22 cp -r *.ttf $out/share/fonts
23 '';
24 passthru.extraWrapperArgs = [
25 "--set"
26 "FONTCONFIG_FILE"
27 (toString (makeFontsConf {
28 fontDirectories = [ "${finalAttrs.finalPackage}/share/fonts" ];
29 }))
30 ];
31
32 passthru.updateScript = nix-update-script { };
33
34 meta = with lib; {
35 description = "Another MPV OSC Script";
36 homepage = "https://github.com/maoiscat/mpv-osc-modern";
37 license = licenses.lgpl21Plus;
38 maintainers = with maintainers; [ Guanran928 ];
39 };
40})