diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index 68ccc3b139d1..80f0a17a9cb7 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -68,8 +68,11 @@ let convert = callPackage ./convert.nix { }; 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-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/modernx-zydezu.nix b/pkgs/applications/video/mpv/scripts/modernx-zydezu.nix new file mode 100644 index 000000000000..3bf923e3902b --- /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 ]; + }; +}) diff --git a/pkgs/applications/video/mpv/scripts/modernx.nix b/pkgs/applications/video/mpv/scripts/modernx.nix new file mode 100644 index 000000000000..e6e9ec6110c4 --- /dev/null +++ b/pkgs/applications/video/mpv/scripts/modernx.nix @@ -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 ]; + }; +}) 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 000000000000..ce32622d64d8 --- /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 ]; + }; +})