mpvScripts.modernx: init at 0.6.0

This commit is contained in:
Guanran Wang 2024-03-18 14:30:18 +08:00
parent 72e1c81dfa
commit 8871be39b1
No known key found for this signature in database
2 changed files with 40 additions and 0 deletions

View File

@ -68,6 +68,7 @@ let
convert = callPackage ./convert.nix { };
cutter = callPackage ./cutter.nix { };
inhibit-gnome = callPackage ./inhibit-gnome.nix { };
modernx = callPackage ./modernx.nix { };
mpris = callPackage ./mpris.nix { };
mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { };
mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };

View File

@ -0,0 +1,39 @@
{ lib
, buildLua
, fetchFromGitHub
, makeFontsConf
, nix-update-script
}:
buildLua (finalAttrs: {
pname = "modernx";
version = "0.6.0";
scriptPath = "modernx.lua";
src = fetchFromGitHub {
owner = "cyl0";
repo = "ModernX";
rev = finalAttrs.version;
hash = "sha256-Gpofl529VbmdN7eOThDAsNfNXNkUDDF82Rd+csXGOQg=";
};
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/cyl0/ModernX";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ Guanran928 ];
};
})