summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2018-04-27 19:03:42 +0000
committerGitHub <noreply@github.com>2018-04-27 19:03:42 +0000
commit547a41a0452a9aaf921e7b157992fb8264c9d81f (patch)
treea540b6612c3d3a154e93e56d721cb3e9e99e70df
parent82e9125272ed41e13d69a601fdeaf7ffe5275b0a (diff)
parentf3ff2b1fa638ba5c32bbf90edeedc00102033139 (diff)
downloadnixlib-547a41a0452a9aaf921e7b157992fb8264c9d81f.tar
nixlib-547a41a0452a9aaf921e7b157992fb8264c9d81f.tar.gz
nixlib-547a41a0452a9aaf921e7b157992fb8264c9d81f.tar.bz2
nixlib-547a41a0452a9aaf921e7b157992fb8264c9d81f.tar.lz
nixlib-547a41a0452a9aaf921e7b157992fb8264c9d81f.tar.xz
nixlib-547a41a0452a9aaf921e7b157992fb8264c9d81f.tar.zst
nixlib-547a41a0452a9aaf921e7b157992fb8264c9d81f.zip
Merge pull request #39512 from Anton-Latukha/handbrake-upd
handbrake: 1.0.7 -> 1.1.0, according changes
-rw-r--r--pkgs/applications/video/handbrake/default.nix29
1 files changed, 16 insertions, 13 deletions
diff --git a/pkgs/applications/video/handbrake/default.nix b/pkgs/applications/video/handbrake/default.nix
index 6ce2ae08eeb4..d13995f6e9bd 100644
--- a/pkgs/applications/video/handbrake/default.nix
+++ b/pkgs/applications/video/handbrake/default.nix
@@ -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