1 { lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, makeWrapper
2 , runCommandCC, runCommand, vapoursynth, writeText, patchelf, buildEnv
3 , zimg, libass, python3, libiconv, testers
7 stdenv.mkDerivation rec {
11 src = fetchFromGitHub {
12 owner = "vapoursynth";
15 sha256 = "sha256-E1uHNcGxBrwg00tNnY3qH6BpvXtBEGkX7QFy0aMLSnA=";
19 ./0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch
22 nativeBuildInputs = [ pkg-config autoreconfHook makeWrapper ];
25 (python3.withPackages (ps: with ps; [ sphinx cython ]))
26 ] ++ lib.optionals stdenv.isDarwin [ libiconv ApplicationServices ];
28 enableParallelBuilding = true;
31 # If vapoursynth is added to the build inputs of mpv and then
32 # used in the wrapping of it, we want to know once inside the
33 # wrapper, what python3 version was used to build vapoursynth so
34 # the right python3.sitePackages will be used there.
37 withPlugins = import ./plugin-interface.nix {
38 inherit lib python3 buildEnv writeText runCommandCC stdenv runCommand
39 vapoursynth makeWrapper withPlugins;
42 tests.version = testers.testVersion {
43 package = vapoursynth;
44 # Check Core version to prevent false positive with API version
45 version = "Core R${version}";
50 wrapProgram $out/bin/vspipe \
51 --prefix PYTHONPATH : $out/${python3.sitePackages}
53 # VapourSynth does not include any plugins by default
54 # and emits a warning when the system plugin directory does not exist.
55 mkdir $out/lib/vapoursynth
59 broken = stdenv.isDarwin; # see https://github.com/NixOS/nixpkgs/pull/189446 for partial fix
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 ];
65 mainProgram = "vspipe";