about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv/scripts/mpv-slicing.nix
blob: cf66a6c78a29756f62309c29458e0ca5787ece9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  lib,
  buildLua,
  fetchFromGitHub,
  ffmpeg,
  unstableGitUpdater,
}:

buildLua {
  pname = "mpv-slicing";
  version = "0-unstable-2017-11-25";

  src = fetchFromGitHub {
    owner = "Kagami";
    repo = "mpv_slicing";
    rev = "d09c11227704c8d5bdaa2c799ef64dce881c63a7";
    hash = "sha256-MKoM0f74/XoctiHQVOB3LzFWtJXpsREfQh5icaebCJo=";
  };
  passthru.updateScript = unstableGitUpdater { };

  postPatch = ''
    substituteInPlace slicing.lua \
        --replace-fail ffmpeg ${lib.getExe ffmpeg}
  '';

  passthru.scriptName = "slicing.lua";

  meta = {
    description = "A lua script to cut fragments of the video in uncompressed RGB format";
    homepage = "https://github.com/Kagami/mpv_slicing";
    license = lib.licenses.cc0;
    maintainers = with lib.maintainers; [ tomasajt ];
  };
}