1 { lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, makeWrapper
2 , runCommandCC, runCommand, vapoursynth, writeText, patchelf, buildEnv
3 , zimg, libass, python3, libiconv
5 , ocrSupport ? false, tesseract
6 , imwriSupport ? true, imagemagick
11 stdenv.mkDerivation rec {
12 pname = "vapoursynth";
15 src = fetchFromGitHub {
16 owner = "vapoursynth";
19 sha256 = "1krfdzc2x2vxv4nq9kiv1c09hgj525qn120ah91fw2ikq8ldvmx4";
23 ./0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch
26 nativeBuildInputs = [ pkg-config autoreconfHook makeWrapper ];
29 (python3.withPackages (ps: with ps; [ sphinx cython ]))
30 ] ++ optionals stdenv.isDarwin [ libiconv ApplicationServices ]
31 ++ optional ocrSupport tesseract
32 ++ optional imwriSupport imagemagick;
35 (optionalString (!ocrSupport) "--disable-ocr")
36 (optionalString (!imwriSupport) "--disable-imwri")
39 enableParallelBuilding = true;
42 # If vapoursynth is added to the build inputs of mpv and then
43 # used in the wrapping of it, we want to know once inside the
44 # wrapper, what python3 version was used to build vapoursynth so
45 # the right python3.sitePackages will be used there.
48 withPlugins = import ./plugin-interface.nix {
49 inherit lib python3 buildEnv writeText runCommandCC stdenv runCommand
50 vapoursynth makeWrapper withPlugins;
55 wrapProgram $out/bin/vspipe \
56 --prefix PYTHONPATH : $out/${python3.sitePackages}
60 description = "A video processing framework with the future in mind";
61 homepage = "http://www.vapoursynth.com/";
62 license = licenses.lgpl21;
63 platforms = platforms.x86_64;
64 maintainers = with maintainers; [ rnhmjoj sbruder tadeokondrak ];