1 { lib, stdenv, fetchurl, fetchpatch, cairo, cmake, opencv, pcre, pkg-config }:
3 stdenv.mkDerivation rec {
4 pname = "frei0r-plugins";
8 url = "https://files.dyne.org/frei0r/releases/${pname}-${version}.tar.gz";
9 hash = "sha256-Gx/48Pm8I+7XJOlOmnwdjwJEv+M0JLtP5o5kYMCIUjo=";
12 # A PR to add support for OpenCV 4 was merged in May 2020. This
13 # patch can be removed when a release beyond 1.7.0 is issued.
16 name = "opencv4-support.patch";
17 url = "https://github.com/dyne/frei0r/commit/c0c8eed79fc8abe6c9881a53d7391efb526a3064.patch";
18 sha256 = "sha256-qxUAui4EEBEj8M/SoyMUkj//KegMTTT6FTBDC/Chxz4=";
22 nativeBuildInputs = [ cmake pkg-config ];
23 buildInputs = [ cairo opencv pcre ];
25 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
26 for f in $out/lib/frei0r-1/*.so* ; do
27 ln -s $f "''${f%.*}.dylib"
32 homepage = "https://frei0r.dyne.org";
33 description = "Minimalist, cross-platform, shared video plugins";
34 license = licenses.gpl2;
35 maintainers = [ maintainers.goibhniu ];
36 platforms = platforms.linux ++ platforms.darwin;