diff options
author | Guanran Wang <guanran928@outlook.com> | 2024-03-18 14:30:56 +0800 |
---|---|---|
committer | Guanran Wang <guanran928@outlook.com> | 2024-03-22 13:03:36 +0800 |
commit | ac1be15e00dfb1de9c9b8d56a27ec3860daf29f3 (patch) | |
tree | 6a4ca597d8c6c15def9cdfa39976e96185630c94 /pkgs/applications/video/mpv/scripts | |
parent | 8871be39b15763ded437771e21ca936d85f1ad0e (diff) |
mpvScripts.modernx-zydezu: init at 0.2.8
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/modernx-zydezu.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 6d36e0241d919..420d0278558d9 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -69,6 +69,7 @@ let cutter = callPackage ./cutter.nix { }; inhibit-gnome = callPackage ./inhibit-gnome.nix { }; modernx = callPackage ./modernx.nix { }; + modernx-zydezu = callPackage ./modernx-zydezu.nix { }; mpris = callPackage ./mpris.nix { }; mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { }; mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { }; diff --git a/pkgs/applications/video/mpv/scripts/modernx-zydezu.nix b/pkgs/applications/video/mpv/scripts/modernx-zydezu.nix new file mode 100644 index 0000000000000..3bf923e3902b3 --- /dev/null +++ b/pkgs/applications/video/mpv/scripts/modernx-zydezu.nix @@ -0,0 +1,39 @@ +{ lib +, buildLua +, fetchFromGitHub +, makeFontsConf +, nix-update-script +}: +buildLua (finalAttrs: { + pname = "modernx-zydezu"; + version = "0.2.8"; + + scriptPath = "modernx.lua"; + src = fetchFromGitHub { + owner = "zydezu"; + repo = "ModernX"; + rev = finalAttrs.version; + hash = "sha256-rruscDutFyQCl5sTtQfmtYPcXKWU51/QFbghSOyMC9o="; + }; + + 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 = "A modern OSC UI replacement for MPV that retains the functionality of the default OSC"; + homepage = "https://github.com/zydezu/ModernX"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ Guanran928 ]; + }; +}) |