2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, makeWrapper
|
2021-02-22 21:28:39 +00:00
|
|
|
, runCommandCC, runCommand, vapoursynth, writeText, patchelf, buildEnv
|
2022-09-22 12:36:57 +00:00
|
|
|
, zimg, libass, python3, libiconv, testers
|
2020-04-24 23:36:52 +00:00
|
|
|
, ApplicationServices
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "vapoursynth";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "60";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vapoursynth";
|
|
|
|
repo = "vapoursynth";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "R${version}";
|
2022-09-22 12:36:57 +00:00
|
|
|
sha256 = "sha256-E1uHNcGxBrwg00tNnY3qH6BpvXtBEGkX7QFy0aMLSnA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-22 21:28:39 +00:00
|
|
|
patches = [
|
|
|
|
./0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
zimg libass
|
|
|
|
(python3.withPackages (ps: with ps; [ sphinx cython ]))
|
2022-04-27 09:35:20 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ libiconv ApplicationServices ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-22 21:28:39 +00:00
|
|
|
passthru = rec {
|
2020-05-29 06:06:01 +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-02-22 21:28:39 +00:00
|
|
|
|
|
|
|
withPlugins = import ./plugin-interface.nix {
|
|
|
|
inherit lib python3 buildEnv writeText runCommandCC stdenv runCommand
|
|
|
|
vapoursynth makeWrapper withPlugins;
|
|
|
|
};
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = vapoursynth;
|
|
|
|
# Check Core version to prevent false positive with API version
|
|
|
|
version = "Core R${version}";
|
|
|
|
};
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/vspipe \
|
|
|
|
--prefix PYTHONPATH : $out/${python3.sitePackages}
|
2021-10-17 09:34:42 +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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-09-09 14:08:57 +00:00
|
|
|
broken = stdenv.isDarwin; # see https://github.com/NixOS/nixpkgs/pull/189446 for partial fix
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A video processing framework with the future in mind";
|
|
|
|
homepage = "http://www.vapoursynth.com/";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.x86_64;
|
2021-02-22 21:28:39 +00:00
|
|
|
maintainers = with maintainers; [ rnhmjoj sbruder tadeokondrak ];
|
2022-09-22 12:36:57 +00:00
|
|
|
mainProgram = "vspipe";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|