2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, makeWrapper
|
2021-01-25 19:19:01 +00:00
|
|
|
, runCommandCC, runCommand, vapoursynth, writeText, patchelf, buildEnv
|
2017-11-05 18:08:36 +00:00
|
|
|
, zimg, libass, python3, libiconv
|
2020-04-16 18:32:35 +01:00
|
|
|
, ApplicationServices
|
2021-02-27 17:36:56 +00:00
|
|
|
, ocrSupport ? false, tesseract
|
|
|
|
, imwriSupport ? true, imagemagick
|
2016-08-27 04:36:45 +01:00
|
|
|
}:
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
with lib;
|
2017-02-19 01:11:08 +00:00
|
|
|
|
2016-08-27 04:36:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-06-25 23:40:27 +01:00
|
|
|
pname = "vapoursynth";
|
2021-01-16 23:00:43 +00:00
|
|
|
version = "R52";
|
2016-08-27 04:36:45 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-02-04 18:56:22 +00:00
|
|
|
owner = "vapoursynth";
|
|
|
|
repo = "vapoursynth";
|
|
|
|
rev = version;
|
2021-01-16 23:00:43 +00:00
|
|
|
sha256 = "1krfdzc2x2vxv4nq9kiv1c09hgj525qn120ah91fw2ikq8ldvmx4";
|
2016-08-27 04:36:45 +01:00
|
|
|
};
|
|
|
|
|
2021-01-25 19:19:01 +00:00
|
|
|
patches = [
|
|
|
|
./0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch
|
|
|
|
];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook makeWrapper ];
|
2016-08-27 04:36:45 +01:00
|
|
|
buildInputs = [
|
2017-11-05 18:08:36 +00:00
|
|
|
zimg libass
|
2016-08-27 04:36:45 +01:00
|
|
|
(python3.withPackages (ps: with ps; [ sphinx cython ]))
|
2017-09-21 21:22:38 +01:00
|
|
|
] ++ optionals stdenv.isDarwin [ libiconv ApplicationServices ]
|
|
|
|
++ optional ocrSupport tesseract
|
2021-02-27 17:36:56 +00:00
|
|
|
++ optional imwriSupport imagemagick;
|
2016-08-27 04:36:45 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
2017-09-12 03:10:32 +01:00
|
|
|
(optionalString (!ocrSupport) "--disable-ocr")
|
|
|
|
(optionalString (!imwriSupport) "--disable-imwri")
|
2016-08-27 04:36:45 +01:00
|
|
|
];
|
|
|
|
|
2018-07-03 16:04:20 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-25 19:19:01 +00:00
|
|
|
passthru = rec {
|
2020-05-22 18:27:38 +01:00
|
|
|
# If vapoursynth is added to the build inputs of mpv and then
|
|
|
|
# used in the wrapping of it, we want to know once inside the
|
|
|
|
# wrapper, what python3 version was used to build vapoursynth so
|
|
|
|
# the right python3.sitePackages will be used there.
|
|
|
|
inherit python3;
|
2021-01-25 19:19:01 +00:00
|
|
|
|
|
|
|
withPlugins = import ./plugin-interface.nix {
|
|
|
|
inherit lib python3 buildEnv writeText runCommandCC stdenv runCommand
|
|
|
|
vapoursynth makeWrapper withPlugins;
|
|
|
|
};
|
2020-05-22 18:27:38 +01:00
|
|
|
};
|
|
|
|
|
2019-06-25 23:40:27 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/vspipe \
|
|
|
|
--prefix PYTHONPATH : $out/${python3.sitePackages}
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2016-08-27 04:36:45 +01:00
|
|
|
description = "A video processing framework with the future in mind";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.vapoursynth.com/";
|
2017-09-12 03:24:22 +01:00
|
|
|
license = licenses.lgpl21;
|
2018-02-27 10:32:55 +00:00
|
|
|
platforms = platforms.x86_64;
|
2021-01-25 19:19:01 +00:00
|
|
|
maintainers = with maintainers; [ rnhmjoj sbruder tadeokondrak ];
|
2016-08-27 04:36:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|