Skip to content

Commit

Permalink
mlt: opencv explicitly, add deps SDL2, libexif to enable more
Browse files Browse the repository at this point in the history
* needs 'which' to find bins from ladspa-sdk, add
* cleanup a bit, qt seems fine as-is (?)
  • Loading branch information
dtzWill committed Feb 12, 2019
1 parent 00098d8 commit bce556c
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions pkgs/development/libraries/mlt/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, makeWrapper, pkgconfig
, SDL, ffmpeg, frei0r, libjack2, libdv, libsamplerate
{ stdenv, fetchFromGitHub, makeWrapper, pkgconfig, which
, SDL, SDL2, ffmpeg, frei0r, libjack2, libdv, libsamplerate
, libvorbis, libxml2, movit, sox, qtbase, qtsvg, gtk2
, fftw, vid-stab, opencv3, ladspa-sdk
, fftw, vid-stab, opencv3, ladspa-sdk, libexif
}:

let inherit (stdenv.lib) getDev; in
Expand All @@ -17,43 +17,25 @@ stdenv.mkDerivation rec {
sha256 = "0pzm3mjbbdl2rkbswgyfkx552xlxh2qrwzsi2a4dicfr92rfgq6w";
};

nativeBuildInputs = [ makeWrapper pkgconfig ];
nativeBuildInputs = [ makeWrapper pkgconfig which ];
buildInputs = [
SDL ffmpeg frei0r libjack2 libdv libsamplerate libvorbis libxml2
SDL SDL2 ffmpeg frei0r libjack2 libdv libsamplerate libvorbis libxml2
movit qtbase qtsvg sox fftw vid-stab opencv3
ladspa-sdk gtk2
ladspa-sdk libexif gtk2
];

# Mostly taken from documentation previously hosted at:
# http://www.kdenlive.org/user-manual/downloading-and-installing-kdenlive/installing-source/installing-mlt-rendering-engine
# Which may now be the installation docs here: https://www.mltframework.org/docs/install
configureFlags = [
"--enable-gpl"
"--enable-gpl3"
#"--avformat-swscale"
"--enable-opengl"
# must be enabled explicitly
"--enable-opencv"
];

# mlt is unable to cope with our multi-prefix Qt build
# because it does not use CMake or qmake.
NIX_CFLAGS_COMPILE = [ "-I${getDev qtsvg}/include/QtSvg" ];

CXXFLAGS = "-std=c++11";

enableParallelBuilding = true;

postInstall = ''
wrapProgram $out/bin/melt --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1
# Remove an unnecessary reference to movit.dev.
s=${movit.dev}/include
t=$(for ((i = 0; i < ''${#s}; i++)); do echo -n X; done)
sed -i $out/lib/mlt/libmltopengl.so -e "s|$s|$t|g"
# Remove an unnecessary reference to movit.dev.
s=${qtbase.dev}/include
t=$(for ((i = 0; i < ''${#s}; i++)); do echo -n X; done)
sed -i $out/lib/mlt/libmltqt.so -e "s|$s|$t|g"
'';

passthru = {
Expand Down

0 comments on commit bce556c

Please sign in to comment.