@@ -9,7 +9,7 @@
99#
1010# Only tested on Linux
1111
12−{ stdenv, lib, fetchFromGitHub,
12+{ stdenv, lib, fetchurl,
1313 python2, pkgconfig, yasm, harfbuzz, zlib,
1414 autoconf, automake, cmake, libtool, m4, jansson,
1515 libass, libiconv, libsamplerate, fribidi, libxml2, bzip2,
@@ -25,16 +25,24 @@
2525}:
2626
2727stdenv.mkDerivation rec {
28− version = "1.0.7";
28+ version = "1.1.0";
2929 name = "handbrake-${version}";
3030
31− src = fetchFromGitHub {
32− owner = "HandBrake";
33− repo = "HandBrake";
34− rev = "${version}";
35− sha256 = "1pdrvicq40s8n23n6k8k097kkjs3ah5wbz1mvxnfy3h2mh5rwk57";
31+ src = fetchurl {
32+ url = ''https://download2.handbrake.fr/${version}/HandBrake-${version}-source.tar.bz2'';
33+ sha256 = "1nj0ihflisxcfkmsk7fm3b5cn7cpnpg66dk2lkp2ip6qidppqbm0";
3634 };
3735
36+ patched_libav_12 = libav_12.overrideAttrs (super: {
37+ # 2018-04-26: HandBrake compilation (1.1.0) requires a patch of LibAV (12.3) from HandBrake team. This patch not went LibAV upstream.
38+ patches = (super.patches or []) ++ [(
39+ fetchurl {
40+ url = ''https://raw.githubusercontent.com/HandBrake/HandBrake/9e1f245708a157231c427c0ef9b91729d59a30e1/contrib/ffmpeg/A21-mp4-sdtp.patch'';
41+ sha256 = "14grzyvb1qbb90k31ibabnwmwnrc48ml6h2z0rjamdv83q45jq4g";
42+ })
43+ ];
44+ });
45+
3846 nativeBuildInputs = [
3947 cmake python2 pkgconfig yasm autoconf automake libtool m4
4048 ] ++ lib.optionals useGtk [ intltool wrapGAppsHook ];
@@ -48,7 +56,7 @@ stdenv.mkDerivation rec {
4856 glib gtk3 libappindicator-gtk3 libnotify
4957 gst_all_1.gstreamer gst_all_1.gst-plugins-base dbus-glib udev
5058 libgudev
51− ] ++ (if useFfmpeg then [ ffmpeg ] else [ libav_12 ])
59+ ] ++ (if useFfmpeg then [ ffmpeg ] else [ patched_libav_12 ])
5260 ++ lib.optional useFdk fdk_aac;
5361
5462 dontUseCmakeConfigure = true;
@@ -58,11 +66,6 @@ stdenv.mkDerivation rec {
5866 preConfigure = ''
5967 patchShebangs scripts
6068
61− # `configure` errors out when trying to read the current year which is too low
62− substituteInPlace make/configure.py \
63− --replace developer release \
64− --replace 'repo.date.strftime("%Y-%m-%d %H:%M:%S")' '""'
65−
6669 substituteInPlace libhb/module.defs \
6770 --replace /usr/include/libxml2 ${libxml2.dev}/include/libxml2
6871