From 2b6766253ec69951ca59833addaaea99c3b5869c Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Thu, 5 Dec 2024 01:16:55 +0800 Subject: [PATCH] mpvScripts.modernz: init at 0.2.1 (#360681) --- .../video/mpv/scripts/modernz.nix | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/applications/video/mpv/scripts/modernz.nix diff --git a/pkgs/applications/video/mpv/scripts/modernz.nix b/pkgs/applications/video/mpv/scripts/modernz.nix new file mode 100644 index 000000000000..d8488dd5f7c6 --- /dev/null +++ b/pkgs/applications/video/mpv/scripts/modernz.nix @@ -0,0 +1,40 @@ +{ + lib, + buildLua, + fetchFromGitHub, + makeFontsConf, + nix-update-script, +}: +buildLua (finalAttrs: { + pname = "modernx"; + version = "0.2.1"; + + scriptPath = "modernz.lua"; + src = fetchFromGitHub { + owner = "Samillion"; + repo = "ModernZ"; + rev = "v${finalAttrs.version}"; + hash = "sha256-Zk7AC8p14ejsIXwDXladOlQ6jm4NUiU4PxPi5ssBVx8="; + }; + + postInstall = '' + install -Dt $out/share/fonts *.ttf + ''; + + passthru.extraWrapperArgs = [ + "--set" + "FONTCONFIG_FILE" + (toString (makeFontsConf { + fontDirectories = [ "${finalAttrs.finalPackage}/share/fonts" ]; + })) + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Sleek and modern OSC for mpv designed to enhance functionality by adding more features, all while preserving the core standards of mpv's OSC"; + homepage = "https://github.com/Samillion/ModernZ"; + license = lib.licenses.lgpl21Plus; + maintainers = with lib.maintainers; [ Guanran928 ]; + }; +})