2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper
|
2020-09-27 15:05:35 +00:00
|
|
|
, SDL, ffmpeg, frei0r, libjack2, libdv, libsamplerate, libexif
|
2021-01-19 06:50:56 +00:00
|
|
|
, libvorbis, libxml2, movit, pkg-config, sox, fftw, opencv4, SDL2
|
2020-09-27 15:05:35 +00:00
|
|
|
, gtk2, genericUpdater, common-updater-scripts, libebur128
|
2014-07-27 10:36:07 +00:00
|
|
|
}:
|
2010-04-30 13:12:07 +00:00
|
|
|
|
2012-06-05 16:52:11 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "mlt";
|
2021-04-11 11:50:19 +00:00
|
|
|
version = "6.26.0";
|
2010-04-30 13:12:07 +00:00
|
|
|
|
2016-08-17 14:09:58 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mltframework";
|
|
|
|
repo = "mlt";
|
|
|
|
rev = "v${version}";
|
2021-04-11 11:50:19 +00:00
|
|
|
sha256 = "FPXROiX7A6oB1VMipw3slyhk7q4fO6m9amohnC67lnA=";
|
2010-04-30 13:12:07 +00:00
|
|
|
};
|
|
|
|
|
2014-07-27 10:36:07 +00:00
|
|
|
buildInputs = [
|
2015-06-27 07:17:52 +00:00
|
|
|
SDL ffmpeg frei0r libjack2 libdv libsamplerate libvorbis libxml2
|
2021-01-19 06:50:56 +00:00
|
|
|
makeWrapper movit pkg-config sox libexif gtk2 fftw libebur128
|
2020-09-27 15:05:35 +00:00
|
|
|
opencv4 SDL2
|
2014-07-27 10:36:07 +00:00
|
|
|
];
|
2010-04-30 13:12:07 +00:00
|
|
|
|
|
|
|
# Mostly taken from:
|
|
|
|
# http://www.kdenlive.org/user-manual/downloading-and-installing-kdenlive/installing-source/installing-mlt-rendering-engine
|
2014-07-27 10:36:07 +00:00
|
|
|
configureFlags = [
|
2020-01-05 13:12:43 +00:00
|
|
|
"--avformat-swscale" "--enable-gpl" "--enable-gpl3" "--enable-opengl"
|
2014-07-27 10:36:07 +00:00
|
|
|
];
|
2013-06-04 22:30:44 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2010-04-30 13:12:07 +00:00
|
|
|
|
2014-07-27 10:36:07 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/melt --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1
|
2017-03-30 21:21:17 +00:00
|
|
|
|
|
|
|
# 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"
|
2014-07-27 10:36:07 +00:00
|
|
|
'';
|
|
|
|
|
2020-09-25 16:21:22 +00:00
|
|
|
passthru.updateScript = genericUpdater {
|
|
|
|
inherit pname version;
|
|
|
|
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2010-04-30 13:12:07 +00:00
|
|
|
description = "Open source multimedia framework, designed for television broadcasting";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.mltframework.org";
|
2014-07-27 10:36:07 +00:00
|
|
|
license = licenses.gpl3;
|
2020-01-05 13:12:43 +00:00
|
|
|
maintainers = with maintainers; [ tohl peti ];
|
2014-07-27 10:36:07 +00:00
|
|
|
platforms = platforms.linux;
|
2010-04-30 13:12:07 +00:00
|
|
|
};
|
|
|
|
}
|