diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-04-01 10:06:01 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-04-01 10:06:01 +0200 |
commit | ab15a62c68bf7bf3b02e3bab00d121cc1426733c (patch) | |
tree | 398a82403b04bfa0bae8cadf1c5a64cf83145965 /pkgs/development/libraries/libav | |
parent | c643ccaa8c91f78b8c89eb87589886b8906d5b38 (diff) | |
parent | a26357eefe017964448b5bb464163646b927a267 (diff) |
Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed than just resolution of merge conflicts.
Diffstat (limited to 'pkgs/development/libraries/libav')
-rw-r--r-- | pkgs/development/libraries/libav/default.nix | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 78b1eef2ccfc7..b84b852691fd6 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, yasm, bzip2, zlib +{ stdenv, fetchurl, pkgconfig, yasm, bzip2, zlib, perl , mp3Support ? true, lame ? null , speexSupport ? true, speex ? null , theoraSupport ? true, libtheora ? null @@ -27,8 +27,7 @@ with { inherit (stdenv.lib) optional optionals; }; let result = { libav_0_8 = libavFun "0.8.17" "31ace2daeb8c105deed9cd3476df47318d417714"; - libav_9 = libavFun "9.18" "e10cde4587c4d4d3bb11d30c7b47e953664cd714"; - libav_11 = libavFun "11.4" "c2ab12102de187f2675a56b828b4a5e9136ab747"; + libav_11 = libavFun "11.6" "2296cbd7afe98591eb164cebe436dcb5582efc9d"; }; libavFun = version : sha1 : stdenv.mkDerivation rec { @@ -38,6 +37,9 @@ let url = "${meta.homepage}/releases/${name}.tar.xz"; inherit sha1; # upstream directly provides sha1 of releases over https }; + + preConfigure = "patchShebangs doc/texi2pod.pl"; + configureFlags = assert stdenv.lib.all (x: x!=null) buildInputs; [ @@ -46,6 +48,7 @@ let "--enable-avplay" "--enable-shared" "--enable-runtime-cpudetect" + "--cc=cc" ] ++ optionals enableGPL [ "--enable-gpl" "--enable-swscale" ] ++ optional mp3Support "--enable-libmp3lame" @@ -62,6 +65,7 @@ let ; buildInputs = [ pkgconfig lame yasm zlib bzip2 SDL ] + ++ [ perl ] # for install-man target ++ optional mp3Support lame ++ optional speexSupport speex ++ optional theoraSupport libtheora @@ -80,8 +84,17 @@ let outputs = [ "dev" "out" "bin" ]; setOutputFlags = false; - # move tools away to lighten runtime deps and size - postInstall = ''moveToOutput bin "$bin" ''; + # alltools to build smaller tools, incl. aviocat, ismindex, qt-faststart, etc. + buildFlags = "all alltools install-man"; + + postInstall = '' + moveToOutput bin "$bin" + # alltools target compiles an executable in tools/ for every C + # source file in tools/, so move those to $out + for tool in $(find tools -type f -executable); do + mv "$tool" "$bin/bin/" + done + ''; doInstallCheck = false; # fails randomly installCheckTarget = "check"; # tests need to be run *after* installation @@ -103,10 +116,9 @@ let description = "A complete, cross-platform solution to record, convert and stream audio and video (fork of ffmpeg)"; license = with licenses; if enableUnfree then unfree #ToDo: redistributable or not? else if enableGPL then gpl2Plus else lgpl21Plus; - platforms = platforms.linux; + platforms = with platforms; linux ++ darwin; maintainers = [ maintainers.vcunat ]; }; }; # libavFun in result - |