2016-03-26 09:44:26 +01:00
|
|
|
{ stdenv, lib, fetchurl, cmake, pkgconfig, lndir
|
2016-04-13 17:15:36 +02:00
|
|
|
, zlib, gettext, libvdpau, libva, libXv, sqlite
|
|
|
|
, yasm, freetype, fontconfig, fribidi, gtk3, qt4
|
2018-01-11 19:29:31 +01:00
|
|
|
, alsaLib
|
2016-04-13 17:15:36 +02:00
|
|
|
, withX265 ? true, x265
|
2016-03-26 09:44:26 +01:00
|
|
|
, withX264 ? true, x264
|
2016-04-13 17:15:36 +02:00
|
|
|
, withXvid ? true, xvidcore
|
2016-03-26 09:44:26 +01:00
|
|
|
, withLAME ? true, lame
|
2016-03-29 14:47:18 +02:00
|
|
|
, withFAAC ? false, faac
|
2016-03-26 09:44:26 +01:00
|
|
|
, withVorbis ? true, libvorbis
|
|
|
|
, withPulse ? true, libpulseaudio
|
|
|
|
, withFAAD ? true, faad2
|
|
|
|
, withOpus ? true, libopus
|
|
|
|
, withVPX ? true, libvpx
|
|
|
|
}:
|
2009-11-24 15:01:48 +01:00
|
|
|
|
2016-04-13 17:15:36 +02:00
|
|
|
let
|
2017-09-05 13:46:38 +02:00
|
|
|
version = "2.7.0";
|
2014-04-09 11:06:46 +02:00
|
|
|
|
2009-11-24 09:27:18 +01:00
|
|
|
src = fetchurl {
|
2016-03-26 09:44:26 +01:00
|
|
|
url = "mirror://sourceforge/avidemux/avidemux/${version}/avidemux_${version}.tar.gz";
|
2017-09-05 13:46:38 +02:00
|
|
|
sha256 = "1bf4l9qwxq3smc1mx5pybydc742a4qqsk17z50j9550d9iwnn7gy";
|
2009-11-24 09:27:18 +01:00
|
|
|
};
|
2014-04-09 11:06:46 +02:00
|
|
|
|
2016-04-13 17:15:36 +02:00
|
|
|
common = {
|
|
|
|
inherit version src;
|
|
|
|
|
|
|
|
patches = [ ./dynamic_install_dir.patch ];
|
|
|
|
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig yasm ];
|
2018-01-11 19:29:31 +01:00
|
|
|
buildInputs = [ zlib gettext libvdpau libva libXv sqlite fribidi fontconfig freetype alsaLib ]
|
2016-04-13 17:15:36 +02:00
|
|
|
++ lib.optional withX264 x264
|
|
|
|
++ lib.optional withX265 x265
|
|
|
|
++ lib.optional withXvid xvidcore
|
|
|
|
++ lib.optional withLAME lame
|
|
|
|
++ lib.optional withFAAC faac
|
|
|
|
++ lib.optional withVorbis libvorbis
|
|
|
|
++ lib.optional withPulse libpulseaudio
|
|
|
|
++ lib.optional withFAAD faad2
|
|
|
|
++ lib.optional withOpus libopus
|
|
|
|
++ lib.optional withVPX libvpx
|
|
|
|
;
|
|
|
|
|
|
|
|
meta = {
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://fixounet.free.fr/avidemux/;
|
2016-04-13 17:15:36 +02:00
|
|
|
description = "Free video editor designed for simple video editing tasks";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ viric abbradar ];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
core = stdenv.mkDerivation (common // {
|
|
|
|
name = "avidemux-${version}";
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd avidemux_core
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
buildPlugin = args: stdenv.mkDerivation (common // {
|
|
|
|
name = "avidemux-${args.pluginName}-${version}";
|
|
|
|
|
|
|
|
buildInputs = (args.buildInputs or []) ++ common.buildInputs ++ [ lndir ];
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DPLUGIN_UI=${args.pluginUi}" ];
|
|
|
|
|
|
|
|
passthru.isUi = args.isUi or false;
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
unpackPhase
|
|
|
|
cd "$sourceRoot"
|
|
|
|
patchPhase
|
|
|
|
|
|
|
|
mkdir $out
|
|
|
|
lndir ${core} $out
|
|
|
|
|
|
|
|
export cmakeFlags="$cmakeFlags -DAVIDEMUX_SOURCE_DIR=$(pwd)"
|
|
|
|
|
|
|
|
for i in ${toString (args.buildDirs or [])} avidemux_plugins; do
|
|
|
|
( cd "$i"
|
|
|
|
cmakeConfigurePhase
|
|
|
|
buildPhase
|
|
|
|
installPhase
|
|
|
|
)
|
2016-03-26 09:44:26 +01:00
|
|
|
done
|
2016-04-13 17:15:36 +02:00
|
|
|
|
|
|
|
fixupPhase
|
|
|
|
'';
|
2017-07-27 14:51:47 +02:00
|
|
|
|
|
|
|
meta = common.meta // args.meta or {};
|
2016-04-13 17:15:36 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
in {
|
|
|
|
avidemux_core = core;
|
|
|
|
|
|
|
|
avidemux_cli = buildPlugin {
|
|
|
|
pluginName = "cli";
|
|
|
|
pluginUi = "CLI";
|
|
|
|
isUi = true;
|
|
|
|
buildDirs = [ "avidemux/cli" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
avidemux_qt4 = buildPlugin {
|
|
|
|
pluginName = "qt4";
|
|
|
|
buildInputs = [ qt4 ];
|
|
|
|
pluginUi = "QT4";
|
|
|
|
isUi = true;
|
|
|
|
buildDirs = [ "avidemux/qt4" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
avidemux_gtk = buildPlugin {
|
|
|
|
pluginName = "gtk";
|
|
|
|
buildInputs = [ gtk3 ];
|
|
|
|
pluginUi = "GTK";
|
|
|
|
isUi = true;
|
|
|
|
buildDirs = [ "avidemux/gtk" ];
|
2017-07-27 14:51:47 +02:00
|
|
|
# Code seems unmaintained.
|
|
|
|
meta.broken = true;
|
2016-04-13 17:15:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
avidemux_common = buildPlugin {
|
|
|
|
pluginName = "common";
|
|
|
|
pluginUi = "COMMON";
|
|
|
|
};
|
|
|
|
|
|
|
|
avidemux_settings = buildPlugin {
|
|
|
|
pluginName = "settings";
|
|
|
|
pluginUi = "SETTINGS";
|
2009-11-24 09:27:18 +01:00
|
|
|
};
|
|
|
|
}
|