mpvScripts: smart{skip,-copy-paste-2} → eisa01.* (#388497)

nicoo 4a7f3ac4 c23bd36c

Changed files
+69 -61
pkgs
+4
pkgs/applications/video/mpv/scripts.nix
···
autodeint
autoload
; # added 2024-11-28
+
inherit (self.eisa01)
+
smart-copy-paste-2
+
smartskip
+
; # added 2025-03-09
inherit (self.occivink)
blacklistExtensions
crop
+65
pkgs/applications/video/mpv/scripts/eisa01.nix
···
+
{
+
lib,
+
fetchFromGitHub,
+
unstableGitUpdater,
+
buildLua,
+
xclip,
+
}:
+
+
let
+
mkScript =
+
pname: args:
+
let
+
self = {
+
inherit pname;
+
version = "0-unstable-2023-11-25";
+
+
src = fetchFromGitHub {
+
owner = "Eisa01";
+
repo = "mpv-scripts";
+
rev = "48d68283cea47ff8e904decc9003b3abc3e2123e";
+
hash = "sha256-edJfotlC5T8asqPIygR67BEWjP4i54Wx54StLfjpc48=";
+
# avoid downloading screenshots and videos
+
sparseCheckout = [
+
"scripts/"
+
"script-opts/"
+
];
+
};
+
passthru.updateScript = unstableGitUpdater { };
+
+
meta = with lib; {
+
homepage = "https://github.com/Eisa01/mpv-scripts";
+
license = licenses.bsd2;
+
};
+
+
# Sadly needed to make `common-updaters` work here
+
pos = builtins.unsafeGetAttrPos "version" self;
+
};
+
in
+
buildLua (lib.attrsets.recursiveUpdate self args);
+
in
+
lib.recurseIntoAttrs (
+
lib.mapAttrs (name: lib.makeOverridable (mkScript name)) {
+
+
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }`
+
smart-copy-paste-2 = {
+
scriptPath = "scripts/SmartCopyPaste_II.lua";
+
prePatch = ''
+
substituteInPlace $scriptPath --replace-fail 'xclip' "${lib.getExe xclip}"
+
'';
+
+
meta = {
+
description = "Smart copy paste with logging and clipboard support";
+
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
+
};
+
};
+
+
smartskip = {
+
scriptPath = "scripts/SmartSkip.lua";
+
meta = {
+
description = "Automatically or manually skip opening, intro, outro, and preview";
+
maintainers = with lib.maintainers; [ iynaix ];
+
};
+
};
+
}
+
)
-33
pkgs/applications/video/mpv/scripts/smart-copy-paste-2.nix
···
-
{
-
lib,
-
buildLua,
-
fetchFromGitHub,
-
unstableGitUpdater,
-
xclip,
-
}:
-
buildLua (finalAttrs: {
-
pname = "smart-copy-paste-2";
-
version = "0-unstable-2023-11-25";
-
-
scriptPath = "scripts/SmartCopyPaste_II.lua";
-
src = fetchFromGitHub {
-
owner = "Eisa01";
-
repo = "mpv-scripts";
-
rev = "48d68283cea47ff8e904decc9003b3abc3e2123e";
-
hash = "sha256-95CAKjBRELX2f7oWSHFWJnI0mikAoxhfUphe9k51Qf4=";
-
};
-
-
prePatch = ''
-
substituteInPlace scripts/SmartCopyPaste_II.lua \
-
--replace-fail 'xclip' "${lib.getExe xclip}"
-
'';
-
-
passthru.updateScript = unstableGitUpdater { };
-
-
meta = with lib; {
-
description = "Smart copy paste with logging and clipboard support";
-
homepage = "https://github.com/Eisa01/mpv-scripts";
-
license = licenses.bsd2;
-
maintainers = with maintainers; [ luftmensch-luftmensch ];
-
};
-
})
-28
pkgs/applications/video/mpv/scripts/smartskip.nix
···
-
{
-
lib,
-
fetchFromGitHub,
-
unstableGitUpdater,
-
buildLua,
-
}:
-
-
buildLua {
-
pname = "smartskip";
-
version = "0-unstable-2023-11-25";
-
-
scriptPath = "scripts/SmartSkip.lua";
-
src = fetchFromGitHub {
-
owner = "Eisa01";
-
repo = "mpv-scripts";
-
rev = "48d68283cea47ff8e904decc9003b3abc3e2123e";
-
hash = "sha256-95CAKjBRELX2f7oWSHFWJnI0mikAoxhfUphe9k51Qf4=";
-
};
-
-
passthru.updateScript = unstableGitUpdater { };
-
-
meta = {
-
description = "Automatically or manually skip opening, intro, outro, and preview";
-
homepage = "https://github.com/Eisa01/mpv-scripts";
-
license = lib.licenses.bsd2;
-
maintainers = [ lib.maintainers.iynaix ];
-
};
-
}