1{
2 lib,
3 buildLua,
4 fetchFromGitHub,
5 makeFontsConf,
6 nix-update-script,
7}:
8buildLua (finalAttrs: {
9 pname = "modernz";
10 version = "0.2.8";
11
12 scriptPath = "modernz.lua";
13 src = fetchFromGitHub {
14 owner = "Samillion";
15 repo = "ModernZ";
16 rev = "v${finalAttrs.version}";
17 hash = "sha256-pQttcfCaw9K8BD/T2CZdRAb9QEFobyeUj/KmNStgzEg=";
18 };
19
20 postInstall = ''
21 install -Dt $out/share/fonts *.ttf
22 '';
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 = {
35 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";
36 homepage = "https://github.com/Samillion/ModernZ";
37 license = lib.licenses.lgpl21Plus;
38 maintainers = with lib.maintainers; [ Guanran928 ];
39 };
40})