1{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook
2, zimg, libass, python3, libiconv
3, ApplicationServices, nasm
4, ocrSupport ? false, tesseract ? null
5, imwriSupport? true, imagemagick7 ? null
6}:
7
8assert ocrSupport -> tesseract != null;
9assert imwriSupport -> imagemagick7 != null;
10
11with stdenv.lib;
12
13stdenv.mkDerivation rec {
14 name = "vapoursynth-${version}";
15 version = "R43";
16
17 src = fetchFromGitHub {
18 owner = "vapoursynth";
19 repo = "vapoursynth";
20 rev = version;
21 sha256 = "01yzxggjxr6fz3wj81z6vgp9m4jqddyk73i22kz2x620cpdgb9j9";
22 };
23
24 nativeBuildInputs = [ pkgconfig autoreconfHook nasm ];
25 buildInputs = [
26 zimg libass
27 (python3.withPackages (ps: with ps; [ sphinx cython ]))
28 ] ++ optionals stdenv.isDarwin [ libiconv ApplicationServices ]
29 ++ optional ocrSupport tesseract
30 ++ optional imwriSupport imagemagick7;
31
32 configureFlags = [
33 "--disable-static"
34 (optionalString (!ocrSupport) "--disable-ocr")
35 (optionalString (!imwriSupport) "--disable-imwri")
36 ];
37
38 enableParallelBuilding = true;
39
40 meta = with stdenv.lib; {
41 description = "A video processing framework with the future in mind";
42 homepage = http://www.vapoursynth.com/;
43 license = licenses.lgpl21;
44 platforms = platforms.x86_64;
45 maintainers = with maintainers; [ rnhmjoj ];
46 };
47
48}