about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv/scripts/mpv-slicing.nix
blob: 2266c8321cb8560b0b36d5b7c95e06b23ac1529c (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
{
  lib,
  buildLua,
  fetchFromGitHub,
  ffmpeg,
}:

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

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

  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 ];
  };
}