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 17:32:35 +00:00
|
|
|
, ApplicationServices
|
2016-08-27 03:36:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-06-25 22:40:27 +00:00
|
|
|
pname = "vapoursynth";
|
2022-06-05 10:48:00 +00:00
|
|
|
version = "59";
|
2016-08-27 03:36:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-02-04 18:56:22 +00:00
|
|
|
owner = "vapoursynth";
|
|
|
|
repo = "vapoursynth";
|
2022-04-26 12:44:04 +00:00
|
|
|
rev = "R${version}";
|
2022-06-05 10:48:00 +00:00
|
|
|
sha256 = "sha256-6w7GSC5ZNIhLpulni4sKq0OvuxHlTJRilBFGH5PQW8U=";
|
2016-08-27 03:36:45 +00: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 03:36:45 +00:00
|
|
|
buildInputs = [
|
2017-11-05 18:08:36 +00:00
|
|
|
zimg libass
|
2016-08-27 03:36:45 +00:00
|
|
|
(python3.withPackages (ps: with ps; [ sphinx cython ]))
|
2022-04-26 12:43:51 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ libiconv ApplicationServices ];
|
2016-08-27 03:36:45 +00:00
|
|
|
|
2018-07-03 15:04:20 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-25 19:19:01 +00:00
|
|
|
passthru = rec {
|
2020-05-22 17:27:38 +00: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 17:27:38 +00:00
|
|
|
};
|
|
|
|
|
2019-06-25 22:40:27 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/vspipe \
|
|
|
|
--prefix PYTHONPATH : $out/${python3.sitePackages}
|
2021-10-15 16:51:16 +00:00
|
|
|
|
|
|
|
# VapourSynth does not include any plugins by default
|
|
|
|
# and emits a warning when the system plugin directory does not exist.
|
|
|
|
mkdir $out/lib/vapoursynth
|
2019-06-25 22:40:27 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2022-05-28 13:38:40 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2016-08-27 03:36:45 +00:00
|
|
|
description = "A video processing framework with the future in mind";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.vapoursynth.com/";
|
2017-09-12 02:24:22 +00: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 03:36:45 +00:00
|
|
|
};
|
|
|
|
}
|