mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
handbrake: 1.2.0: switch to FFMpeg, deps sort
This commit is contained in:
parent
3f222747bf
commit
0f83cff8a2
1 changed files with 27 additions and 42 deletions
|
@ -1,25 +1,31 @@
|
|||
# Upstream distributes HandBrake with bundle of according versions of libraries and patches to them.
|
||||
#
|
||||
# Derivation patches HandBrake to use our closure.
|
||||
# Derivation patches HandBrake to use Nix closure dependencies.
|
||||
#
|
||||
|
||||
{ stdenv, lib, fetchurl,
|
||||
python2, pkgconfig, yasm, zlib,
|
||||
autoconf, automake, libtool, m4, jansson,
|
||||
libass, libiconv, libsamplerate, fribidi, libxml2, bzip2,
|
||||
libogg, libopus, libtheora, libvorbis, libdvdcss, a52dec,
|
||||
lame, libdvdread, libdvdnav, libbluray,
|
||||
mp4v2, mpeg2dec, x264, x265, libmkv,
|
||||
fontconfig, freetype, hicolor-icon-theme,
|
||||
glib, gtk3, intltool, libnotify,
|
||||
gst_all_1, dbus-glib, udev, libgudev, libvpx,
|
||||
useGtk ? true, wrapGAppsHook ? null, libappindicator-gtk3 ? null,
|
||||
useFfmpeg ? false, libav_12 ? null, ffmpeg ? null,
|
||||
python2, pkgconfig, autoconf, automake, yasm, libtool, m4,
|
||||
fribidi, fontconfig, freetype, jansson, zlib,
|
||||
libass, libiconv, libsamplerate, libxml2, bzip2,
|
||||
ffmpeg_4, libtheora, x264, x265, libvpx, mpeg2dec,
|
||||
libopus, lame, libvorbis, a52dec,
|
||||
libogg, libmkv, mp4v2,
|
||||
libdvdread, libdvdnav, libdvdcss, libbluray,
|
||||
useGtk ? true, wrapGAppsHook ? null,
|
||||
intltool ? null,
|
||||
glib ? null,
|
||||
gtk3 ? null,
|
||||
libappindicator-gtk3 ? null,
|
||||
libnotify ? null,
|
||||
gst_all_1 ? null,
|
||||
dbus-glib ? null,
|
||||
udev ? null,
|
||||
libgudev ? null,
|
||||
hicolor-icon-theme ? null,
|
||||
useFdk ? false, fdk_aac ? null
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
# TODO: Release 1.2.0 would switch LibAV to FFmpeg.
|
||||
version = "1.2.0";
|
||||
name = "handbrake-${version}";
|
||||
|
||||
|
@ -28,44 +34,22 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "03clkknaq3mz84p85cvr21gsy9b8vv2g4vvyfz44hz8la253jfqi";
|
||||
};
|
||||
|
||||
patched_libav_12 = libav_12.overrideAttrs (super: {
|
||||
patches = (super.patches or []) ++ [(
|
||||
# NOTE: 2018-04-26: HandBrake compilation (1.1.0) requires
|
||||
# a patch of LibAV (12.3) from HandBrake team. This patch
|
||||
# not went LibAV upstream.
|
||||
fetchurl {
|
||||
url = ''https://raw.githubusercontent.com/HandBrake/HandBrake/9e1f245708a157231c427c0ef9b91729d59a30e1/contrib/ffmpeg/A21-mp4-sdtp.patch'';
|
||||
sha256 = "14grzyvb1qbb90k31ibabnwmwnrc48ml6h2z0rjamdv83q45jq4g";
|
||||
})
|
||||
# NOTE: 2018-11-11: Transcoding to MP4 can fail with:
|
||||
#
|
||||
# Tag avc1/0x31637661 incompatible with output codec id '28'
|
||||
# muxavformat: avformat_write_header failed!
|
||||
#
|
||||
# Fix using Handbrake patch that is not upstream in libav.
|
||||
(
|
||||
fetchurl {
|
||||
url = ''https://raw.githubusercontent.com/HandBrake/HandBrake/df6c26fa261423237ee2bec0bf784c32cbfda3fa/contrib/ffmpeg/A20-avc3-hvc1-override.patch'';
|
||||
sha256 = "1vijd7bmkzp3sb6zhpcpdni8fz4h13wgglnml6cz9f44j41w2c3v";
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
nativeBuildInputs = [
|
||||
python2 pkgconfig yasm autoconf automake libtool m4
|
||||
] ++ lib.optionals useGtk [ intltool wrapGAppsHook ];
|
||||
python2 pkgconfig autoconf automake yasm libtool m4
|
||||
] ++ lib.optionals useGtk [ wrapGAppsHook intltool ];
|
||||
|
||||
buildInputs = [
|
||||
fribidi fontconfig freetype jansson zlib
|
||||
libass libiconv libsamplerate libxml2 bzip2
|
||||
libogg libopus libtheora libvorbis libdvdcss a52dec libmkv
|
||||
lame libdvdread libdvdnav libbluray mp4v2 mpeg2dec x264 x265 libvpx
|
||||
ffmpeg_4 libtheora x264 x265 libvpx mpeg2dec
|
||||
libopus lame libvorbis a52dec
|
||||
libogg libmkv mp4v2
|
||||
libdvdread libdvdnav libdvdcss libbluray
|
||||
] ++ lib.optionals useGtk [
|
||||
glib gtk3 libappindicator-gtk3 libnotify
|
||||
gst_all_1.gstreamer gst_all_1.gst-plugins-base dbus-glib udev
|
||||
libgudev hicolor-icon-theme
|
||||
] ++ (if useFfmpeg then [ ffmpeg ] else [ patched_libav_12 ])
|
||||
++ lib.optional useFdk fdk_aac;
|
||||
] ++ lib.optional useFdk fdk_aac;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
@ -87,6 +71,7 @@ stdenv.mkDerivation rec {
|
|||
(if useFdk then "--enable-fdk-aac" else "")
|
||||
];
|
||||
|
||||
# NOTE: 2018-12-27: Check NixOS HandBrake test if changing
|
||||
NIX_LDFLAGS = [
|
||||
"-lx265"
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue