lol
at 23.05-pre 67 lines 2.2 kB view raw
1{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, makeWrapper 2, runCommandCC, runCommand, vapoursynth, writeText, patchelf, buildEnv 3, zimg, libass, python3, libiconv, testers 4, ApplicationServices 5}: 6 7stdenv.mkDerivation rec { 8 pname = "vapoursynth"; 9 version = "60"; 10 11 src = fetchFromGitHub { 12 owner = "vapoursynth"; 13 repo = "vapoursynth"; 14 rev = "R${version}"; 15 sha256 = "sha256-E1uHNcGxBrwg00tNnY3qH6BpvXtBEGkX7QFy0aMLSnA="; 16 }; 17 18 patches = [ 19 ./0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch 20 ]; 21 22 nativeBuildInputs = [ pkg-config autoreconfHook makeWrapper ]; 23 buildInputs = [ 24 zimg libass 25 (python3.withPackages (ps: with ps; [ sphinx cython ])) 26 ] ++ lib.optionals stdenv.isDarwin [ libiconv ApplicationServices ]; 27 28 enableParallelBuilding = true; 29 30 passthru = rec { 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. 35 inherit python3; 36 37 withPlugins = import ./plugin-interface.nix { 38 inherit lib python3 buildEnv writeText runCommandCC stdenv runCommand 39 vapoursynth makeWrapper withPlugins; 40 }; 41 42 tests.version = testers.testVersion { 43 package = vapoursynth; 44 # Check Core version to prevent false positive with API version 45 version = "Core R${version}"; 46 }; 47 }; 48 49 postInstall = '' 50 wrapProgram $out/bin/vspipe \ 51 --prefix PYTHONPATH : $out/${python3.sitePackages} 52 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 56 ''; 57 58 meta = with lib; { 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"; 66 }; 67}