From 8871be39b15763ded437771e21ca936d85f1ad0e Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Mon, 18 Mar 2024 14:30:18 +0800 Subject: [PATCH 1/3] mpvScripts.modernx: init at 0.6.0 --- .../video/mpv/scripts/default.nix | 1 + .../video/mpv/scripts/modernx.nix | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/video/mpv/scripts/modernx.nix diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index 68ccc3b139d1..6d36e0241d91 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -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 { }; 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 ]; + }; +}) From ac1be15e00dfb1de9c9b8d56a27ec3860daf29f3 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Mon, 18 Mar 2024 14:30:56 +0800 Subject: [PATCH 2/3] mpvScripts.modernx-zydezu: init at 0.2.8 --- .../video/mpv/scripts/default.nix | 1 + .../video/mpv/scripts/modernx-zydezu.nix | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/video/mpv/scripts/modernx-zydezu.nix diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index 6d36e0241d91..420d0278558d 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 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 ]; + }; +}) From 320550f17a213a44724a7699823bf42729e956ea Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Mon, 18 Mar 2024 14:32:03 +0800 Subject: [PATCH 3/3] mpvScripts.mpv-osc-modern: init at 1.1.1 --- .../video/mpv/scripts/default.nix | 1 + .../video/mpv/scripts/mpv-osc-modern.nix | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index 420d0278558d..80f0a17a9cb7 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -72,6 +72,7 @@ let 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/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 ]; + }; +})