1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

Merge pull request #126569 from polygon/flowblade

This commit is contained in:
Sandro 2021-06-15 13:35:08 +02:00 committed by GitHub
commit 95737ccee7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 75 additions and 6 deletions

View file

@ -8187,6 +8187,12 @@
githubId = 1829032;
name = "Paul Hendry";
};
polygon = {
email = "polygon@wh2.tu-dresden.de";
name = "Polygon";
github = "polygon";
githubId = 51489;
};
polyrod = {
email = "dc1mdp@gmail.com";
github = "polyrod";

View file

@ -0,0 +1,45 @@
{ lib, fetchFromGitHub, stdenv
, ffmpeg, frei0r, sox, gtk3, python3, ladspaPlugins
, gobject-introspection, makeWrapper, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "flowblade";
version = "2.8.0.3";
src = fetchFromGitHub {
owner = "jliljebl";
repo = pname;
rev = "v${version}";
sha256 = "sha256-/EkI3qiceB5eKTVQnpG+z4e6yaE9hDtn6I+iN/J+h/g=";
};
buildInputs = [
ffmpeg frei0r sox gtk3 gobject-introspection ladspaPlugins
(python3.withPackages (ps: with ps; [ mlt pygobject3 dbus-python numpy pillow ]))
];
nativeBuildInputs = [ gobject-introspection makeWrapper wrapGAppsHook ];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -a ${src}/flowblade-trunk $out/flowblade
makeWrapper $out/flowblade/flowblade $out/bin/flowblade \
--set FREI0R_PATH ${frei0r}/lib/frei0r-1 \
--set LADSPA_PATH ${ladspaPlugins}/lib/ladspa \
''${gappsWrapperArgs[@]}
runHook postInstall
'';
meta = with lib; {
description = "Multitrack Non-Linear Video Editor";
homepage = "https://jliljebl.github.io/flowblade/";
license = with licenses; [ gpl3Plus ];
platforms = platforms.linux;
maintainers = with maintainers; [ polygon ];
};
}

View file

@ -2,6 +2,8 @@
, SDL, ffmpeg, frei0r, libjack2, libdv, libsamplerate, libexif
, libvorbis, libxml2, movit, pkg-config, sox, fftw, opencv4, SDL2
, gtk2, genericUpdater, common-updater-scripts, libebur128
, jack2, ladspa-sdk, swig, which, ncurses
, enablePython ? false, python
}:
stdenv.mkDerivation rec {
@ -16,18 +18,22 @@ stdenv.mkDerivation rec {
};
buildInputs = [
SDL ffmpeg frei0r libjack2 libdv libsamplerate libvorbis libxml2
makeWrapper movit pkg-config sox libexif gtk2 fftw libebur128
opencv4 SDL2
];
SDL ffmpeg frei0r libjack2 libdv libsamplerate libvorbis libxml2.dev
movit sox libexif gtk2 fftw libebur128 opencv4 SDL2 jack2
ladspa-sdk
] ++ lib.optional enablePython ncurses;
nativeBuildInputs = [ pkg-config makeWrapper which ]
++ lib.optionals enablePython [ python swig ];
# Mostly taken from:
# http://www.kdenlive.org/user-manual/downloading-and-installing-kdenlive/installing-source/installing-mlt-rendering-engine
configureFlags = [
"--avformat-swscale" "--enable-gpl" "--enable-gpl3" "--enable-opengl"
];
] ++ lib.optional enablePython "--swig-languages=python";
enableParallelBuilding = true;
outPythonPath = lib.optionalString enablePython "$(toPythonPath $out)";
postInstall = ''
wrapProgram $out/bin/melt --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1
@ -36,6 +42,11 @@ stdenv.mkDerivation rec {
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"
'' + lib.optionalString enablePython ''
mkdir -p ${outPythonPath}/mlt
cp -a src/swig/python/_mlt.so ${outPythonPath}/mlt/
cp -a src/swig/python/mlt.py ${outPythonPath}/mlt/__init__.py
sed -i ${outPythonPath}/mlt/__init__.py -e "s|return importlib.import_module('_mlt')|return importlib.import_module('mlt._mlt')|g"
'';
passthru.updateScript = genericUpdater {
@ -47,7 +58,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Open source multimedia framework, designed for television broadcasting";
homepage = "https://www.mltframework.org";
license = licenses.gpl3;
license = with licenses; [ gpl3Only gpl2Only lgpl21Only ];
maintainers = with maintainers; [ tohl peti ];
platforms = platforms.linux;
};

View file

@ -4779,6 +4779,8 @@ in
flips = callPackage ../tools/compression/flips { };
flowblade = callPackage ../applications/video/flowblade { };
fmbt = callPackage ../development/tools/fmbt {
python = python2;
};

View file

@ -4373,6 +4373,11 @@ in {
mlxtend = callPackage ../development/python-modules/mlxtend { };
mlt = toPythonModule (pkgs.mlt.override {
inherit python;
enablePython = true;
});
mmh3 = callPackage ../development/python-modules/mmh3 { };
mmpython = callPackage ../development/python-modules/mmpython { };