summary refs log tree commit diff
path: root/pkgs/applications/video/handbrake/default.nix
diff options
context:
space:
mode:
authorGabriel Ebner <gebner@gebner.org>2016-08-29 08:03:41 +0200
committerGabriel Ebner <gebner@gebner.org>2016-08-29 08:05:26 +0200
commit6a11b11a7d8d89e724d0c1670777d196204f33e4 (patch)
tree0f56d3414a0b79b60848816247747d033d53a983 /pkgs/applications/video/handbrake/default.nix
parent7a073c1c6ddf98752cfe12f719f82dcd09d22079 (diff)
downloadnixpkgs-6a11b11a7d8d89e724d0c1670777d196204f33e4.tar
nixpkgs-6a11b11a7d8d89e724d0c1670777d196204f33e4.tar.gz
nixpkgs-6a11b11a7d8d89e724d0c1670777d196204f33e4.tar.bz2
nixpkgs-6a11b11a7d8d89e724d0c1670777d196204f33e4.tar.lz
nixpkgs-6a11b11a7d8d89e724d0c1670777d196204f33e4.tar.xz
nixpkgs-6a11b11a7d8d89e724d0c1670777d196204f33e4.tar.zst
nixpkgs-6a11b11a7d8d89e724d0c1670777d196204f33e4.zip
handbrake: 0.9.9 -> 0.10.5
Diffstat (limited to 'pkgs/applications/video/handbrake/default.nix')
-rw-r--r--pkgs/applications/video/handbrake/default.nix46
1 files changed, 18 insertions, 28 deletions
diff --git a/pkgs/applications/video/handbrake/default.nix b/pkgs/applications/video/handbrake/default.nix
index 351cf5c5211..9f257cde21f 100644
--- a/pkgs/applications/video/handbrake/default.nix
+++ b/pkgs/applications/video/handbrake/default.nix
@@ -7,8 +7,6 @@
 # This has the benefits of providing improvements to other packages,
 # making licenses more clear and reducing compile time/install size.
 #
-# For compliance, the unfree codec faac is optionally spliced out.
-#
 # Only tested on Linux
 #
 # TODO: package and use libappindicator
@@ -18,47 +16,40 @@
   autoconf, automake, libtool, m4,
   libass, libsamplerate, fribidi, libxml2, bzip2,
   libogg, libtheora, libvorbis, libdvdcss, a52dec, fdk_aac,
-  lame, faac, ffmpeg, libdvdread, libdvdnav, libbluray,
-  mp4v2, mpeg2dec, x264, libmkv,
+  lame, ffmpeg, libdvdread, libdvdnav, libbluray,
+  mp4v2, mpeg2dec, x264, x265, libmkv,
   fontconfig, freetype, hicolor_icon_theme,
-  glib, gtk, webkitgtk, intltool, libnotify,
-  gst_all_1, dbus_glib, udev, libgudev,
-  useGtk ? true,
-  useWebKitGtk ? false # This prevents ghb from starting in my tests
+  glib, gtk3, intltool, libnotify,
+  gst_all_1, dbus_glib, udev, libgudev, libvpx,
+  wrapGAppsHook,
+  useGtk ? true
 }:
 
 stdenv.mkDerivation rec {
-  version = "0.9.9";
+  version = "0.10.5";
   name = "handbrake-${version}";
 
-  # ToDo: doesn't work (yet)
-  allowUnfree = false; # config.allowUnfree or false;
-
   buildInputsX = stdenv.lib.optionals useGtk [
-    glib gtk intltool libnotify
+    glib gtk3 intltool libnotify
     gst_all_1.gstreamer gst_all_1.gst-plugins-base dbus_glib udev
     libgudev
-  ] ++ stdenv.lib.optionals useWebKitGtk [ webkitgtk ];
-
-  # Did not test compiling with it
-  unfreeInputs = stdenv.lib.optional allowUnfree faac;
+    wrapGAppsHook
+  ];
 
   nativeBuildInputs = [ python pkgconfig yasm autoconf automake libtool m4 ];
   buildInputs = [
     fribidi fontconfig freetype hicolor_icon_theme
     libass libsamplerate libxml2 bzip2
     libogg libtheora libvorbis libdvdcss a52dec libmkv fdk_aac
-    lame ffmpeg libdvdread libdvdnav libbluray mp4v2 mpeg2dec x264
-  ] ++ buildInputsX ++ unfreeInputs;
+    lame ffmpeg libdvdread libdvdnav libbluray mp4v2 mpeg2dec x264 x265 libvpx
+  ] ++ buildInputsX;
 
 
   src = fetchurl {
     url = "http://download.handbrake.fr/releases/${version}/HandBrake-${version}.tar.bz2";
-    sha256 = "1crmm1c32vx60jfl2bqzg59q4qqx6m83b08snp7h1njc21sdf7d7";
+    sha256 = "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv";
   };
 
-  patches = stdenv.lib.optional (! allowUnfree) ./disable-unfree.patch;
-
   preConfigure = ''
     # Fake wget to prevent downloads
     mkdir wget
@@ -72,13 +63,13 @@ stdenv.mkDerivation rec {
     sed -i '/MODULES += contrib/d' make/include/main.defs
     sed -i '/PKG_CONFIG_PATH=/d' gtk/module.rules
 
-    # disable faac if non-free
-    if [ -z "$allowUnfree" ]; then
-      rm libhb/encfaac.c
-    fi
+    patch -p1 -R < ${./handbrake-0.10.3-nolibav.patch}
   '';
 
-  configureFlags = "--enable-fdk-aac ${if useGtk then "--disable-gtk-update-checks" else "--disable-gtk"}";
+  configureFlags = [
+    "--enable-fdk-aac"
+    (if useGtk then "--disable-gtk-update-checks" else "--disable-gtk")
+  ];
 
   preBuild = ''
     cd build
@@ -90,7 +81,6 @@ stdenv.mkDerivation rec {
     longDescription = ''
       Handbrake is a versatile transcoding DVD ripper. This package
       provides the cli HandbrakeCLI and the GTK+ version ghb.
-      The faac library is disabled if you're compiling free-only.
     '';
     license = stdenv.lib.licenses.gpl2;
     maintainers = [ stdenv.lib.maintainers.wmertens ];