git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #52453 from Anton-Latukha/handbrake-1.2

handbrake: 1.1.2 -> 1.2.0

commita9632dd47048f1b6d26a3c6de8c8c3b3d4728602 authorPeter Hoeg <peter@hoeg.com> dateFri 11 Jan 2019, 14:10 (8 years ago) parent8f92eff25f9129
4 files changed+46−53
pkgs/applications/video/handbrake/default.nix+39−46 pkgs/development/libraries/ffmpeg-full/default.nix+1−3 pkgs/development/libraries/ffmpeg-full/nv-codec-headers.nix → pkgs/development/libraries/nv-codec-headers/default.nix+4−4 pkgs/top-level/all-packages.nix+2
pkgs/applications/video/handbrake/default.nix+39−46
@@ -1,72 +1,64 @@
11# Upstream distributes HandBrake with bundle of according versions of libraries and patches to them.
22#
3−# Derivation patches HandBrake to use our closure.
3+# Derivation patches HandBrake to use Nix closure dependencies.
44#
55
6−{ stdenv, lib, fetchurl,
7− python2, pkgconfig, yasm, zlib,
8− autoconf, automake, libtool, m4, jansson,
9− libass, libiconv, libsamplerate, fribidi, libxml2, bzip2,
10− libogg, libopus, libtheora, libvorbis, libdvdcss, a52dec,
11− lame, libdvdread, libdvdnav, libbluray,
12− mp4v2, mpeg2dec, x264, x265, libmkv,
13− fontconfig, freetype, hicolor-icon-theme,
14− glib, gtk3, intltool, libnotify,
15− gst_all_1, dbus-glib, udev, libgudev, libvpx,
16− useGtk ? true, wrapGAppsHook ? null, libappindicator-gtk3 ? null,
17− useFfmpeg ? false, libav_12 ? null, ffmpeg ? null,
6+{ stdenv, lib, fetchurl, callPackage,
7+ # Main build tools
8+ python2, pkgconfig, autoconf, automake, cmake, nasm, libtool, m4,
9+ # Processing, video codecs, containers
10+ ffmpeg-full, nv-codec-headers, libogg, x264, x265, libvpx, libtheora,
11+ # Codecs, audio
12+ libopus, lame, libvorbis, a52dec, speex, libsamplerate,
13+ # Text processing
14+ libiconv, fribidi, fontconfig, freetype, libass, jansson, libxml2,
15+ # Optical media
16+ libdvdread, libdvdnav, libdvdcss, libbluray,
17+ useGtk ? true, wrapGAppsHook ? null,
18+ intltool ? null,
19+ glib ? null,
20+ gtk3 ? null,
21+ libappindicator-gtk3 ? null,
22+ libnotify ? null,
23+ gst_all_1 ? null,
24+ dbus-glib ? null,
25+ udev ? null,
26+ libgudev ? null,
27+ hicolor-icon-theme ? null,
1828 useFdk ? false, fdk_aac ? null
1929}:
2030
2131stdenv.mkDerivation rec {
22− # TODO: Release 1.2.0 would switch LibAV to FFmpeg.
23− version = "1.1.2";
32+ version = "1.2.0";
2433 name = "handbrake-${version}";
2534
2635 src = fetchurl {
2736 url = ''https://download2.handbrake.fr/${version}/HandBrake-${version}-source.tar.bz2'';
28− sha256 = "0bny0hwlr55g2c69rsamv0xvwmfh1s4a582b9vq20xv5ly84m6ms";
37+ sha256 = "03clkknaq3mz84p85cvr21gsy9b8vv2g4vvyfz44hz8la253jfqi";
2938 };
3039
31− patched_libav_12 = libav_12.overrideAttrs (super: {
32− patches = (super.patches or []) ++ [(
33− # NOTE: 2018-04-26: HandBrake compilation (1.1.0) requires
34− # a patch of LibAV (12.3) from HandBrake team. This patch
35− # not went LibAV upstream.
36− fetchurl {
37− url = ''https://raw.githubusercontent.com/HandBrake/HandBrake/9e1f245708a157231c427c0ef9b91729d59a30e1/contrib/ffmpeg/A21-mp4-sdtp.patch'';
38− sha256 = "14grzyvb1qbb90k31ibabnwmwnrc48ml6h2z0rjamdv83q45jq4g";
39− })
40− # NOTE: 2018-11-11: Transcoding to MP4 can fail with:
41− #
42− # Tag avc1/0x31637661 incompatible with output codec id '28'
43− # muxavformat: avformat_write_header failed!
44− #
45− # Fix using Handbrake patch that is not upstream in libav.
46− (
47− fetchurl {
48− url = ''https://raw.githubusercontent.com/HandBrake/HandBrake/df6c26fa261423237ee2bec0bf784c32cbfda3fa/contrib/ffmpeg/A20-avc3-hvc1-override.patch'';
49− sha256 = "1vijd7bmkzp3sb6zhpcpdni8fz4h13wgglnml6cz9f44j41w2c3v";
50− })
51− ];
52− });
53−
5440 nativeBuildInputs = [
55− python2 pkgconfig yasm autoconf automake libtool m4
41+ python2 pkgconfig autoconf automake cmake nasm libtool m4
5642 ] ++ lib.optionals useGtk [ intltool wrapGAppsHook ];
5743
5844 buildInputs = [
59− fribidi fontconfig freetype jansson zlib
60− libass libiconv libsamplerate libxml2 bzip2
61− libogg libopus libtheora libvorbis libdvdcss a52dec libmkv
62− lame libdvdread libdvdnav libbluray mp4v2 mpeg2dec x264 x265 libvpx
45+ ffmpeg-full libogg libtheora x264 x265 libvpx
46+ libopus lame libvorbis a52dec speex libsamplerate
47+ libiconv fribidi fontconfig freetype libass jansson libxml2
48+ libdvdread libdvdnav libdvdcss libbluray
6349 ] ++ lib.optionals useGtk [
6450 glib gtk3 libappindicator-gtk3 libnotify
6551 gst_all_1.gstreamer gst_all_1.gst-plugins-base dbus-glib udev
6652 libgudev hicolor-icon-theme
67− ] ++ (if useFfmpeg then [ ffmpeg ] else [ patched_libav_12 ])
68− ++ lib.optional useFdk fdk_aac;
53+ ] ++ lib.optional useFdk fdk_aac
54+ # NOTE: 2018-12-27: Handbrake supports nv-codec-headers for Linux only,
55+ # look at ./make/configure.py search "enable_nvenc"
56+ ++ lib.optional stdenv.isLinux nv-codec-headers;
6957
58+ # NOTE: 2018-12-25: v1.2.0 now requires cmake dep
59+ # (default distribution bundles&builds 3rd party libs),
60+ # don't trigger cmake build
61+ dontUseCmakeConfigure = true;
7062 enableParallelBuilding = true;
7163
7264 preConfigure = ''
@@ -87,6 +79,7 @@ stdenv.mkDerivation rec {
8779 (if useFdk then "--enable-fdk-aac" else "")
8880 ];
8981
82+ # NOTE: 2018-12-27: Check NixOS HandBrake test if changing
9083 NIX_LDFLAGS = [
9184 "-lx265"
9285 ];
pkgs/development/libraries/ffmpeg-full/default.nix+1−3
@@ -96,7 +96,7 @@
9696, libxcbshapeExtlib ? true # X11 grabbing shape rendering
9797, libXv ? null # Xlib support
9898, lzma ? null # xz-utils
99−, nvenc ? false, nvidia-video-sdk ? null # NVIDIA NVENC support
99+, nvenc ? false, nvidia-video-sdk ? null, nv-codec-headers ? null # NVIDIA NVENC support
100100, callPackage # needed for NVENC to access external ffmpeg nvidia headers
101101, openal ? null # OpenAL 1.1 capture support
102102#, opencl ? null # OpenCL code
@@ -176,8 +176,6 @@
176176let
177177 inherit (stdenv) isCygwin isFreeBSD isLinux;
178178 inherit (stdenv.lib) optional optionals optionalString enableFeature;
179−
180− nv-codec-headers = callPackage ./nv-codec-headers.nix { };
181179in
182180
183181/*
pkgs/development/libraries/ffmpeg-full/nv-codec-headers.nix → pkgs/development/libraries/nv-codec-headers/default.nixrenamed+4−4
@@ -2,18 +2,18 @@
22
33stdenv.mkDerivation rec {
44 name = "nv-codec-headers-${version}";
5− version = "n8.1.24.2";
5+ version = "8.2.15.6";
66
77 src = fetchgit {
88 url = "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git";
9− rev = "${version}";
10− sha256 = "122i3f6whiz5yp44dhk73ifr1973z8vvfbg4216vb782bl8b5bam";
9+ rev = "n${version}";
10+ sha256 = "0216ww8byjxz639kagyw0mr9vxxwj89xdnj448d579vjr54jychv";
1111 };
1212
1313 makeFlags = [ "PREFIX=$(out)" ];
1414
1515 meta = {
16− description = "ffmpeg nvidia headers for NVENC";
16+ description = "FFmpeg version of headers for NVENC";
1717 homepage = http://ffmpeg.org/;
1818 license = stdenv.lib.licenses.gpl3Plus;
1919 maintainers = [ stdenv.lib.maintainers.MP2E ];
pkgs/top-level/all-packages.nix+2
@@ -11817,6 +11817,8 @@ in
1181711817
1181811818 ntrack = callPackage ../development/libraries/ntrack { };
1181911819
11820+ nv-codec-headers = callPackage ../development/libraries/nv-codec-headers { };
11821+
1182011822 nvidia-texture-tools = callPackage ../development/libraries/nvidia-texture-tools { };
1182111823
1182211824 nvidia-video-sdk = callPackage ../development/libraries/nvidia-video-sdk { };