diff options
author | Guanran Wang <guanran928@outlook.com> | 2024-03-18 14:32:03 +0800 |
---|---|---|
committer | Guanran Wang <guanran928@outlook.com> | 2024-03-22 13:03:44 +0800 |
commit | 320550f17a213a44724a7699823bf42729e956ea (patch) | |
tree | 6d3587a02370a61dfc9fc0d016290be2c2d8bfc2 /pkgs/applications/video/mpv/scripts | |
parent | ac1be15e00dfb1de9c9b8d56a27ec3860daf29f3 (diff) |
mpvScripts.mpv-osc-modern: init at 1.1.1
Diffstat (limited to 'pkgs/applications/video/mpv/scripts')
-rw-r--r-- | pkgs/applications/video/mpv/scripts/default.nix | 1 | ||||
-rw-r--r-- | pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix | 39 |
2 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index 420d0278558d9..80f0a17a9cb7a 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -72,6 +72,7 @@ let modernx-zydezu = callPackage ./modernx-zydezu.nix { }; mpris = callPackage ./mpris.nix { }; mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { }; + mpv-osc-modern = callPackage ./mpv-osc-modern.nix { }; mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { }; mpv-webm = callPackage ./mpv-webm.nix { }; mpvacious = callPackage ./mpvacious.nix { }; diff --git a/pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix b/pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix new file mode 100644 index 0000000000000..ce32622d64d8f --- /dev/null +++ b/pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix @@ -0,0 +1,39 @@ +{ lib +, buildLua +, fetchFromGitHub +, makeFontsConf +, nix-update-script +}: +buildLua (finalAttrs: { + pname = "mpv-osc-modern"; + version = "1.1.1"; + + scriptPath = "modern.lua"; + src = fetchFromGitHub { + owner = "maoiscat"; + repo = "mpv-osc-modern"; + rev = "v${finalAttrs.version}"; + hash = "sha256-RMUy8UpSRSCEPAbnGLpJ2NjDsDdkjq8cNsdGwsQ5ANU="; + }; + + postInstall = '' + mkdir -p $out/share/fonts + cp -r *.ttf $out/share/fonts + ''; + passthru.extraWrapperArgs = [ + "--set" + "FONTCONFIG_FILE" + (toString (makeFontsConf { + fontDirectories = [ "${finalAttrs.finalPackage}/share/fonts" ]; + })) + ]; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + description = "Another MPV OSC Script"; + homepage = "https://github.com/maoiscat/mpv-osc-modern"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ Guanran928 ]; + }; +}) |