nixpkgs/pkgs/development/libraries/vapoursynth/default.nix

61 lines
1.7 KiB
Nix
Raw Normal View History

2019-06-25 15:40:27 -07:00
{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, makeWrapper
2017-11-05 10:08:36 -08:00
, zimg, libass, python3, libiconv
2020-04-16 10:32:35 -07:00
, ApplicationServices
2018-02-27 02:32:55 -08:00
, ocrSupport ? false, tesseract ? null
, imwriSupport? true, imagemagick7 ? null
2016-08-26 20:36:45 -07:00
}:
2017-09-11 19:10:32 -07:00
assert ocrSupport -> tesseract != null;
assert imwriSupport -> imagemagick7 != null;
with stdenv.lib;
2016-08-26 20:36:45 -07:00
stdenv.mkDerivation rec {
2019-06-25 15:40:27 -07:00
pname = "vapoursynth";
2020-04-16 10:32:35 -07:00
version = "R49";
2016-08-26 20:36:45 -07:00
src = fetchFromGitHub {
2017-02-04 10:56:22 -08:00
owner = "vapoursynth";
repo = "vapoursynth";
rev = version;
2020-04-16 10:32:35 -07:00
sha256 = "1d298mlb24nlc2x7pixfbkd0qbpv4c706c32idsgpi96z1spkhvl";
2016-08-26 20:36:45 -07:00
};
2020-04-16 10:32:35 -07:00
nativeBuildInputs = [ pkgconfig autoreconfHook makeWrapper ];
2016-08-26 20:36:45 -07:00
buildInputs = [
2017-11-05 10:08:36 -08:00
zimg libass
2016-08-26 20:36:45 -07:00
(python3.withPackages (ps: with ps; [ sphinx cython ]))
2017-09-21 13:22:38 -07:00
] ++ optionals stdenv.isDarwin [ libiconv ApplicationServices ]
++ optional ocrSupport tesseract
++ optional imwriSupport imagemagick7;
2016-08-26 20:36:45 -07:00
configureFlags = [
2017-09-11 19:10:32 -07:00
(optionalString (!ocrSupport) "--disable-ocr")
(optionalString (!imwriSupport) "--disable-imwri")
2016-08-26 20:36:45 -07:00
];
2018-07-03 08:04:20 -07:00
enableParallelBuilding = true;
passthru = {
# 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;
};
2019-06-25 15:40:27 -07:00
postInstall = ''
wrapProgram $out/bin/vspipe \
--prefix PYTHONPATH : $out/${python3.sitePackages}
'';
2017-09-11 19:10:32 -07:00
meta = with stdenv.lib; {
2016-08-26 20:36:45 -07:00
description = "A video processing framework with the future in mind";
homepage = "http://www.vapoursynth.com/";
2017-09-11 19:24:22 -07:00
license = licenses.lgpl21;
2018-02-27 02:32:55 -08:00
platforms = platforms.x86_64;
2019-06-25 15:40:27 -07:00
maintainers = with maintainers; [ rnhmjoj tadeokondrak ];
2016-08-26 20:36:45 -07:00
};
}