about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/vapoursynth/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/vapoursynth/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/vapoursynth/default.nix23
1 files changed, 15 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/libraries/vapoursynth/default.nix b/nixpkgs/pkgs/development/libraries/vapoursynth/default.nix
index 93f8d3c5ae5f..8ef209fe8051 100644
--- a/nixpkgs/pkgs/development/libraries/vapoursynth/default.nix
+++ b/nixpkgs/pkgs/development/libraries/vapoursynth/default.nix
@@ -1,13 +1,11 @@
 { lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, makeWrapper
+, runCommandCC, runCommand, vapoursynth, writeText, patchelf, buildEnv
 , zimg, libass, python3, libiconv
 , ApplicationServices
-, ocrSupport ?  false, tesseract ? null
-, imwriSupport? true,  imagemagick7 ? null
+, ocrSupport ? false, tesseract
+, imwriSupport ? true, imagemagick
 }:
 
-assert ocrSupport   -> tesseract != null;
-assert imwriSupport -> imagemagick7 != null;
-
 with lib;
 
 stdenv.mkDerivation rec {
@@ -21,13 +19,17 @@ stdenv.mkDerivation rec {
     sha256 = "1krfdzc2x2vxv4nq9kiv1c09hgj525qn120ah91fw2ikq8ldvmx4";
   };
 
+  patches = [
+    ./0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch
+  ];
+
   nativeBuildInputs = [ pkg-config autoreconfHook makeWrapper ];
   buildInputs = [
     zimg libass
     (python3.withPackages (ps: with ps; [ sphinx cython ]))
   ] ++ optionals stdenv.isDarwin [ libiconv ApplicationServices ]
     ++ optional ocrSupport   tesseract
-    ++ optional imwriSupport imagemagick7;
+    ++ optional imwriSupport imagemagick;
 
   configureFlags = [
     (optionalString (!ocrSupport)   "--disable-ocr")
@@ -36,12 +38,17 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  passthru = {
+  passthru = rec {
     # 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;
+
+    withPlugins = import ./plugin-interface.nix {
+      inherit lib python3 buildEnv writeText runCommandCC stdenv runCommand
+        vapoursynth makeWrapper withPlugins;
+    };
   };
 
   postInstall = ''
@@ -54,7 +61,7 @@ stdenv.mkDerivation rec {
     homepage    = "http://www.vapoursynth.com/";
     license     = licenses.lgpl21;
     platforms   = platforms.x86_64;
-    maintainers = with maintainers; [ rnhmjoj tadeokondrak ];
+    maintainers = with maintainers; [ rnhmjoj sbruder tadeokondrak ];
   };
 
 }