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

This commit is contained in:
nicoo
2025-03-12 17:59:57 +00:00
committed by GitHub
4 changed files with 69 additions and 61 deletions
+4
View File
@@ -101,6 +101,10 @@ let
autodeint
autoload
; # added 2024-11-28
inherit (self.eisa01)
smart-copy-paste-2
smartskip
; # added 2025-03-09
inherit (self.occivink)
blacklistExtensions
crop
@@ -0,0 +1,65 @@
{
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 ];
};
};
}
)
@@ -1,33 +0,0 @@
{
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 ];
};
})
@@ -1,28 +0,0 @@
{
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 ];
};
}