Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

mpvScripts: group `smartskip` and `smart-copy-paste-2` in a common attrset

nicoo cfb1af2b 270903c3

+64 -61
+4
pkgs/applications/video/mpv/scripts.nix
··· 101 autodeint 102 autoload 103 ; # added 2024-11-28 104 inherit (self.occivink) 105 blacklistExtensions 106 crop
··· 101 autodeint 102 autoload 103 ; # added 2024-11-28 104 + inherit (self.eisa01) 105 + smart-copy-paste-2 106 + smartskip 107 + ; # added 2025-03-09 108 inherit (self.occivink) 109 blacklistExtensions 110 crop
+60
pkgs/applications/video/mpv/scripts/eisa01.nix
···
··· 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + unstableGitUpdater, 5 + buildLua, 6 + xclip, 7 + }: 8 + 9 + let 10 + mkScript = 11 + pname: args: 12 + let 13 + self = { 14 + inherit pname; 15 + version = "0-unstable-2023-11-25"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "Eisa01"; 19 + repo = "mpv-scripts"; 20 + rev = "48d68283cea47ff8e904decc9003b3abc3e2123e"; 21 + hash = "sha256-95CAKjBRELX2f7oWSHFWJnI0mikAoxhfUphe9k51Qf4="; 22 + }; 23 + passthru.updateScript = unstableGitUpdater { }; 24 + 25 + meta = with lib; { 26 + homepage = "https://github.com/Eisa01/mpv-scripts"; 27 + license = licenses.bsd2; 28 + }; 29 + 30 + # Sadly needed to make `common-updaters` work here 31 + pos = builtins.unsafeGetAttrPos "version" self; 32 + }; 33 + in 34 + buildLua (lib.attrsets.recursiveUpdate self args); 35 + in 36 + lib.recurseIntoAttrs ( 37 + lib.mapAttrs (name: lib.makeOverridable (mkScript name)) { 38 + 39 + # Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }` 40 + smart-copy-paste-2 = { 41 + scriptPath = "scripts/SmartCopyPaste_II.lua"; 42 + prePatch = '' 43 + substituteInPlace $scriptPath --replace-fail 'xclip' "${lib.getExe xclip}" 44 + ''; 45 + 46 + meta = { 47 + description = "Smart copy paste with logging and clipboard support"; 48 + maintainers = with lib.maintainers; [ luftmensch-luftmensch ]; 49 + }; 50 + }; 51 + 52 + smartskip = { 53 + scriptPath = "scripts/SmartSkip.lua"; 54 + meta = { 55 + description = "Automatically or manually skip opening, intro, outro, and preview"; 56 + maintainers = with lib.maintainers; [ iynaix ]; 57 + }; 58 + }; 59 + } 60 + )
-33
pkgs/applications/video/mpv/scripts/smart-copy-paste-2.nix
··· 1 - { 2 - lib, 3 - buildLua, 4 - fetchFromGitHub, 5 - unstableGitUpdater, 6 - xclip, 7 - }: 8 - buildLua (finalAttrs: { 9 - pname = "smart-copy-paste-2"; 10 - version = "0-unstable-2023-11-25"; 11 - 12 - scriptPath = "scripts/SmartCopyPaste_II.lua"; 13 - src = fetchFromGitHub { 14 - owner = "Eisa01"; 15 - repo = "mpv-scripts"; 16 - rev = "48d68283cea47ff8e904decc9003b3abc3e2123e"; 17 - hash = "sha256-95CAKjBRELX2f7oWSHFWJnI0mikAoxhfUphe9k51Qf4="; 18 - }; 19 - 20 - prePatch = '' 21 - substituteInPlace scripts/SmartCopyPaste_II.lua \ 22 - --replace-fail 'xclip' "${lib.getExe xclip}" 23 - ''; 24 - 25 - passthru.updateScript = unstableGitUpdater { }; 26 - 27 - meta = with lib; { 28 - description = "Smart copy paste with logging and clipboard support"; 29 - homepage = "https://github.com/Eisa01/mpv-scripts"; 30 - license = licenses.bsd2; 31 - maintainers = with maintainers; [ luftmensch-luftmensch ]; 32 - }; 33 - })
···
-28
pkgs/applications/video/mpv/scripts/smartskip.nix
··· 1 - { 2 - lib, 3 - fetchFromGitHub, 4 - unstableGitUpdater, 5 - buildLua, 6 - }: 7 - 8 - buildLua { 9 - pname = "smartskip"; 10 - version = "0-unstable-2023-11-25"; 11 - 12 - scriptPath = "scripts/SmartSkip.lua"; 13 - src = fetchFromGitHub { 14 - owner = "Eisa01"; 15 - repo = "mpv-scripts"; 16 - rev = "48d68283cea47ff8e904decc9003b3abc3e2123e"; 17 - hash = "sha256-95CAKjBRELX2f7oWSHFWJnI0mikAoxhfUphe9k51Qf4="; 18 - }; 19 - 20 - passthru.updateScript = unstableGitUpdater { }; 21 - 22 - meta = { 23 - description = "Automatically or manually skip opening, intro, outro, and preview"; 24 - homepage = "https://github.com/Eisa01/mpv-scripts"; 25 - license = lib.licenses.bsd2; 26 - maintainers = [ lib.maintainers.iynaix ]; 27 - }; 28 - }
···