2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, lib, fetchurl, cmake, pkgconfig
|
2016-04-13 17:15:36 +02:00
|
|
|
, zlib, gettext, libvdpau, libva, libXv, sqlite
|
2018-02-17 17:01:46 +01:00
|
|
|
, yasm, freetype, fontconfig, fribidi
|
2019-07-05 17:42:08 +02:00
|
|
|
, makeWrapper, libXext, libGLU, qttools, qtbase, wrapQtAppsHook
|
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
|
2018-02-17 17:01:46 +01:00
|
|
|
, withQT ? true
|
|
|
|
, withCLI ? true
|
|
|
|
, default ? "qt5"
|
|
|
|
, withPlugins ? true
|
2016-03-26 09:44:26 +01:00
|
|
|
}:
|
2009-11-24 15:01:48 +01:00
|
|
|
|
2018-02-17 17:01:46 +01:00
|
|
|
assert withQT -> qttools != null && qtbase != null;
|
|
|
|
assert default != "qt5" -> default == "cli";
|
|
|
|
assert !withQT -> default != "qt5";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "avidemux";
|
2020-07-08 22:32:10 +02:00
|
|
|
version = "2.7.6";
|
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";
|
2020-07-08 22:32:10 +02:00
|
|
|
sha256 = "1kwkn976ppahrcr74bnv6sqx75pzl9y21m1mvr5ksi1m6lgp924s";
|
2009-11-24 09:27:18 +01:00
|
|
|
};
|
2014-04-09 11:06:46 +02:00
|
|
|
|
2018-04-11 20:57:06 +02:00
|
|
|
patches = [
|
|
|
|
./dynamic_install_dir.patch
|
|
|
|
./bootstrap_logging.patch
|
|
|
|
];
|
2018-02-17 17:01:46 +01:00
|
|
|
|
2019-07-05 17:42:08 +02:00
|
|
|
nativeBuildInputs =
|
|
|
|
[ yasm cmake pkgconfig ]
|
|
|
|
++ lib.optional withQT wrapQtAppsHook;
|
2018-02-17 17:01:46 +01:00
|
|
|
buildInputs = [
|
|
|
|
zlib gettext libvdpau libva libXv sqlite fribidi fontconfig
|
2018-03-05 14:53:38 +01:00
|
|
|
freetype alsaLib libXext libGLU makeWrapper
|
2018-02-17 17:01:46 +01: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;
|
|
|
|
|
2018-06-19 11:28:13 +02:00
|
|
|
buildCommand = let
|
|
|
|
qtVersion = "5.${stdenv.lib.versions.minor qtbase.version}";
|
2019-07-05 17:42:08 +02:00
|
|
|
wrapWith = makeWrapper: filename:
|
|
|
|
"${makeWrapper} ${filename} --set ADM_ROOT_DIR $out --prefix LD_LIBRARY_PATH : ${libXext}/lib";
|
|
|
|
wrapQtApp = wrapWith "wrapQtApp";
|
|
|
|
wrapProgram = wrapWith "wrapProgram";
|
2018-06-19 11:28:13 +02:00
|
|
|
in ''
|
2018-02-17 17:01:46 +01:00
|
|
|
unpackPhase
|
|
|
|
cd "$sourceRoot"
|
|
|
|
patchPhase
|
|
|
|
|
2020-01-02 01:29:34 +01:00
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${libXext}/lib"
|
2018-02-17 17:01:46 +01:00
|
|
|
${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
|
|
|
|
|
2018-06-19 11:28:13 +02:00
|
|
|
${wrapProgram "$out/bin/avidemux3_cli"}
|
|
|
|
|
|
|
|
${stdenv.lib.optionalString withQT ''
|
2019-07-05 17:42:08 +02:00
|
|
|
${wrapQtApp "$out/bin/avidemux3_qt5"}
|
|
|
|
${wrapQtApp "$out/bin/avidemux3_jobs_qt5"}
|
2018-06-19 11:28:13 +02:00
|
|
|
''}
|
|
|
|
|
2018-02-17 17:01:46 +01:00
|
|
|
ln -s "$out/bin/avidemux3_${default}" "$out/bin/avidemux"
|
|
|
|
|
|
|
|
fixupPhase
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://fixounet.free.fr/avidemux/";
|
2018-02-17 17:01:46 +01:00
|
|
|
description = "Free video editor designed for simple video editing tasks";
|
2018-07-22 21:50:19 +02:00
|
|
|
maintainers = with maintainers; [ abbradar ma27 ];
|
2018-03-06 11:58:01 +01:00
|
|
|
# "CPU not supported" errors on AArch64
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2018-02-17 17:01:46 +01:00
|
|
|
license = licenses.gpl2;
|
2009-11-24 09:27:18 +01:00
|
|
|
};
|
|
|
|
}
|