From f3f8da4a5fe1a3e955dd38b68115de4cc6e6ff5e Mon Sep 17 00:00:00 2001 From: Ryan Artecona Date: Fri, 18 Mar 2016 02:49:38 -0400 Subject: libav: support Darwin & install docs/manpages --- pkgs/development/libraries/libav/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'pkgs/development/libraries/libav') diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 23b1402e3e7..9611fdbb8d9 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 @@ -46,6 +46,7 @@ let "--enable-avplay" "--enable-shared" "--enable-runtime-cpudetect" + "--cc=cc" ] ++ optionals enableGPL [ "--enable-gpl" "--enable-swscale" ] ++ optional mp3Support "--enable-libmp3lame" @@ -62,6 +63,7 @@ let ; buildInputs = [ pkgconfig lame yasm zlib bzip2 SDL ] + ++ [ perl ] # for install-man target ++ optional mp3Support lame ++ optional speexSupport speex ++ optional theoraSupport libtheora @@ -79,10 +81,19 @@ let outputs = [ "out" "tools" ]; - # move avplay to get rid of the SDL dependency in the main output + # alltools to build smaller tools, incl. aviocat, ismindex, qt-faststart, etc. + buildFlags = "all alltools install-man"; + postInstall = '' + # move avplay to get rid of the SDL dependency in the main output mkdir -p "$tools/bin" mv "$out/bin/avplay" "$tools/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" "$out/bin/" + done ''; doInstallCheck = false; # fails randomly @@ -105,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 - -- cgit 1.4.1