handbrake: 1.0.7 -> 1.1.0 & according changes

This commit is contained in:
Anton-Latukha 2018-04-27 00:37:40 +03:00
parent bae15c811f
commit f3ff2b1fa6

View File

@ -9,7 +9,7 @@
#
# Only tested on Linux
{ stdenv, lib, fetchFromGitHub,
{ stdenv, lib, fetchurl,
python2, pkgconfig, yasm, harfbuzz, zlib,
autoconf, automake, cmake, libtool, m4, jansson,
libass, libiconv, libsamplerate, fribidi, libxml2, bzip2,
@ -25,16 +25,24 @@
}:
stdenv.mkDerivation rec {
version = "1.0.7";
version = "1.1.0";
name = "handbrake-${version}";
src = fetchFromGitHub {
owner = "HandBrake";
repo = "HandBrake";
rev = "${version}";
sha256 = "1pdrvicq40s8n23n6k8k097kkjs3ah5wbz1mvxnfy3h2mh5rwk57";
src = fetchurl {
url = ''https://download2.handbrake.fr/${version}/HandBrake-${version}-source.tar.bz2'';
sha256 = "1nj0ihflisxcfkmsk7fm3b5cn7cpnpg66dk2lkp2ip6qidppqbm0";
};
patched_libav_12 = libav_12.overrideAttrs (super: {
# 2018-04-26: HandBrake compilation (1.1.0) requires a patch of LibAV (12.3) from HandBrake team. This patch not went LibAV upstream.
patches = (super.patches or []) ++ [(
fetchurl {
url = ''https://raw.githubusercontent.com/HandBrake/HandBrake/9e1f245708a157231c427c0ef9b91729d59a30e1/contrib/ffmpeg/A21-mp4-sdtp.patch'';
sha256 = "14grzyvb1qbb90k31ibabnwmwnrc48ml6h2z0rjamdv83q45jq4g";
})
];
});
nativeBuildInputs = [
cmake python2 pkgconfig yasm autoconf automake libtool m4
] ++ lib.optionals useGtk [ intltool wrapGAppsHook ];
@ -48,7 +56,7 @@ stdenv.mkDerivation rec {
glib gtk3 libappindicator-gtk3 libnotify
gst_all_1.gstreamer gst_all_1.gst-plugins-base dbus-glib udev
libgudev
] ++ (if useFfmpeg then [ ffmpeg ] else [ libav_12 ])
] ++ (if useFfmpeg then [ ffmpeg ] else [ patched_libav_12 ])
++ lib.optional useFdk fdk_aac;
dontUseCmakeConfigure = true;
@ -58,11 +66,6 @@ stdenv.mkDerivation rec {
preConfigure = ''
patchShebangs scripts
# `configure` errors out when trying to read the current year which is too low
substituteInPlace make/configure.py \
--replace developer release \
--replace 'repo.date.strftime("%Y-%m-%d %H:%M:%S")' '""'
substituteInPlace libhb/module.defs \
--replace /usr/include/libxml2 ${libxml2.dev}/include/libxml2