2016-03-26 08:44:26 +00:00
|
|
|
{ stdenv, lib, fetchurl, cmake, pkgconfig, lndir
|
2016-04-13 16:15:36 +01:00
|
|
|
, zlib, gettext, libvdpau, libva, libXv, sqlite
|
2018-02-17 16:01:46 +00:00
|
|
|
, yasm, freetype, fontconfig, fribidi
|
2018-03-05 13:53:38 +00:00
|
|
|
, makeWrapper, libXext, libGLU, qttools, qtbase
|
2018-01-11 18:29:31 +00:00
|
|
|
, alsaLib
|
2016-04-13 16:15:36 +01:00
|
|
|
, withX265 ? true, x265
|
2016-03-26 08:44:26 +00:00
|
|
|
, withX264 ? true, x264
|
2016-04-13 16:15:36 +01:00
|
|
|
, withXvid ? true, xvidcore
|
2016-03-26 08:44:26 +00:00
|
|
|
, withLAME ? true, lame
|
2016-03-29 13:47:18 +01:00
|
|
|
, withFAAC ? false, faac
|
2016-03-26 08:44:26 +00:00
|
|
|
, withVorbis ? true, libvorbis
|
|
|
|
, withPulse ? true, libpulseaudio
|
|
|
|
, withFAAD ? true, faad2
|
|
|
|
, withOpus ? true, libopus
|
|
|
|
, withVPX ? true, libvpx
|
2018-02-17 16:01:46 +00:00
|
|
|
, withQT ? true
|
|
|
|
, withCLI ? true
|
|
|
|
, default ? "qt5"
|
|
|
|
, withPlugins ? true
|
2016-03-26 08:44:26 +00:00
|
|
|
}:
|
2009-11-24 14:01:48 +00:00
|
|
|
|
2018-02-17 16:01:46 +00:00
|
|
|
assert withQT -> qttools != null && qtbase != null;
|
|
|
|
assert default != "qt5" -> default == "cli";
|
|
|
|
assert !withQT -> default != "qt5";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "avidemux-${version}";
|
2017-09-05 12:46:38 +01:00
|
|
|
version = "2.7.0";
|
2014-04-09 10:06:46 +01:00
|
|
|
|
2009-11-24 08:27:18 +00:00
|
|
|
src = fetchurl {
|
2016-03-26 08:44:26 +00:00
|
|
|
url = "mirror://sourceforge/avidemux/avidemux/${version}/avidemux_${version}.tar.gz";
|
2017-09-05 12:46:38 +01:00
|
|
|
sha256 = "1bf4l9qwxq3smc1mx5pybydc742a4qqsk17z50j9550d9iwnn7gy";
|
2009-11-24 08:27:18 +00:00
|
|
|
};
|
2014-04-09 10:06:46 +01:00
|
|
|
|
2018-02-17 16:01:46 +00:00
|
|
|
patches = [ ./dynamic_install_dir.patch ./bootstrap_logging.patch ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ yasm cmake pkgconfig ];
|
|
|
|
buildInputs = [
|
|
|
|
zlib gettext libvdpau libva libXv sqlite fribidi fontconfig
|
2018-03-05 13:53:38 +00:00
|
|
|
freetype alsaLib libXext libGLU makeWrapper
|
2018-02-17 16:01:46 +00: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.optionals withQT [ qttools qtbase ]
|
|
|
|
++ lib.optional withVPX libvpx;
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
unpackPhase
|
|
|
|
cd "$sourceRoot"
|
|
|
|
patchPhase
|
|
|
|
|
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXext}/lib"
|
|
|
|
${stdenv.shell} bootStrap.bash \
|
|
|
|
--with-core \
|
|
|
|
${if withQT then "--with-qt" else "--without-qt"} \
|
|
|
|
${if withCLI then "--with-cli" else "--without-cli"} \
|
|
|
|
${if withPlugins then "--with-plugins" else "--without-plugins"}
|
|
|
|
|
|
|
|
mkdir $out
|
|
|
|
cp -R install/usr/* $out
|
|
|
|
|
|
|
|
for i in $out/bin/*; do
|
|
|
|
wrapProgram $i \
|
|
|
|
--set ADM_ROOT_DIR $out \
|
|
|
|
--prefix LD_LIBRARY_PATH ":" "${libXext}/lib"
|
|
|
|
done
|
|
|
|
ln -s "$out/bin/avidemux3_${default}" "$out/bin/avidemux"
|
|
|
|
|
|
|
|
fixupPhase
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://fixounet.free.fr/avidemux/;
|
|
|
|
description = "Free video editor designed for simple video editing tasks";
|
|
|
|
maintainers = with maintainers; [ viric abbradar ma27 ];
|
2018-03-06 10:58:01 +00:00
|
|
|
# "CPU not supported" errors on AArch64
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2018-02-17 16:01:46 +00:00
|
|
|
license = licenses.gpl2;
|
2009-11-24 08:27:18 +00:00
|
|
|
};
|
|
|
|
}
|