2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchgit,
|
|
|
|
unstableGitUpdater,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
buildLua,
|
|
|
|
libnotify,
|
|
|
|
mkvtoolnix-cli,
|
|
|
|
yad,
|
2024-01-13 08:15:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
buildLua {
|
2020-05-15 21:57:56 +00:00
|
|
|
pname = "mpv-convert-script";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0-unstable-2015-07-02";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://gist.github.com/Zehkul/25ea7ae77b30af959be0";
|
|
|
|
rev = "f95cee43e390e843a47e8ec9d1711a12a8cd343d";
|
|
|
|
sha256 = "13m7l4sy2r8jv2sfrb3vvqvnim4a9ilnv28q5drlg09v298z3mck";
|
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [ ./convert.patch ];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace convert_script.lua \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail 'mkvpropedit_exe = "mkvpropedit"' \
|
|
|
|
'mkvpropedit_exe = "${lib.getExe' mkvtoolnix-cli "mkvpropedit"}"' \
|
|
|
|
--replace-fail 'mkvmerge_exe = "mkvmerge"' \
|
|
|
|
'mkvmerge_exe = "${lib.getExe' mkvtoolnix-cli "mkvmerge"}"' \
|
|
|
|
--replace-fail 'yad_exe = "yad"' \
|
|
|
|
'yad_exe = "${lib.getExe yad}"' \
|
|
|
|
--replace-fail 'notify_send_exe = "notify-send"' \
|
|
|
|
'notify_send_exe = "${lib.getExe libnotify}"' \
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
scriptPath = "convert_script.lua";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-22 02:08:21 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Convert parts of a video while you are watching it in mpv";
|
|
|
|
homepage = "https://gist.github.com/Zehkul/25ea7ae77b30af959be0";
|
2021-04-22 02:08:21 +00:00
|
|
|
maintainers = [ maintainers.Profpatsch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
When this script is loaded into mpv, you can hit Alt+W to mark the beginning
|
|
|
|
and Alt+W again to mark the end of the clip. Then a settings window opens.
|
|
|
|
'';
|
2021-04-25 03:57:28 +00:00
|
|
|
# author was asked to add a license https://gist.github.com/Zehkul/25ea7ae77b30af959be0#gistcomment-3715700
|
2021-04-22 02:08:21 +00:00
|
|
|
license = licenses.unfree;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|